我已经有这个问题已经持续了几个星期了,而且我的一些课程给我带来了很大的压力。我一直在使用Ubuntu来使用Python 3来打开本地服务器。我尝试过使用“sudo”,但仍然拒绝访问。我已经向教授们求助了,但他们也不知道什么是错的。我曾经让它工作过一段时间,之后再也没有用了。这是我不断得到的错误。
____@DESKTOP-55VJC61:/mnt/c/Users/Julia/Desktop/p5/empty-example$ python3 -m
http.server
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.5/http/server.py", line 1221, in <module>
test(HandlerClass=handler_class, port=args.port, bind=args.bind)
File "/usr/lib/python3.5/http/server.py", line 1194, in test
httpd = ServerClass(server_address, HandlerClass)
File "/usr/lib/python3.5/socketserver.py", line 440, in __init__
self.server_bind()
File "/usr/lib/python3.5/http/server.py", line 138, in server_bind
socketserver.TCPServer.server_bind(self)
File "/usr/lib/python3.5/socketserver.py", line 454, in server_bind
self.socket.bind(self.server_address)
PermissionError: [Errno 13] Permission denied
如果有人有解决此问题的方法,请帮忙!