如何获得;python http.server“;在ArchLinux中工作
当我输入“python http.server”时,我希望得到一个简单的web服务器,而不是:如何获得;python http.server“;在ArchLinux中工作,python,linux,python-3.x,archlinux,Python,Linux,Python 3.x,Archlinux,当我输入“python http.server”时,我希望得到一个简单的web服务器,而不是: $ python http.server python: can't open file 'http.server': [Errno 2] No such file or directory 在我的服务器上,还有一个Arch-box(已经运行了一段时间,所以不清楚安装了什么软件包),这个命令确实运行Web服务器 我错过了什么 编辑:是的,当然是“-m”,我很抱歉浪费时间,但是谢谢你的帮助。对于Pyt
$ python http.server
python: can't open file 'http.server': [Errno 2] No such file or directory
在我的服务器上,还有一个Arch-box(已经运行了一段时间,所以不清楚安装了什么软件包),这个命令确实运行Web服务器
我错过了什么
编辑:是的,当然是“-m”,我很抱歉浪费时间,但是谢谢你的帮助。对于Python2,我相信你要找的命令是
python -m SimpleHTTPServer
如果你有蟒蛇3,那么建议你需要
python3 -m http.server
对于Python2,我相信您正在寻找的命令是
python -m SimpleHTTPServer
如果你有蟒蛇3,那么建议你需要
python3 -m http.server
在Python3上,这将在端口
9000
上运行侦听服务器
$ python3 -m http.server 9000
在Python3上,这将在端口
9000
上运行侦听服务器
$ python3 -m http.server 9000