Django ./manage.py runserver 0.0.0.0:80 无法运行 50
提示:Error:Youdon'thavepermissiontoaccessthatport.命令前加sudo又提示File"./manage.py",line17,i...
提示:Error: You don't have permission to access that port.
命令前加 sudo 又提示
File "./manage.py", line 17, in <module>
"Couldn't import Django. Are you sure it's installed and "
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
求大神指教 展开
命令前加 sudo 又提示
File "./manage.py", line 17, in <module>
"Couldn't import Django. Are you sure it's installed and "
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
求大神指教 展开
2个回答
2018-06-19 · 知道合伙人互联网行家
关注
展开全部
在cmd里运行python manage.py runserver 想要测试自己的代码都是如你上面说的,在cmd里运行python manage.py runserver就行了。 难道你想直接双击models.py运行吗?这是错误的。
追问
我是在ubuntu 系统下的 在终端里运行的 python manage.py runserver 可以运行
加上
0.0.0.0:80
就不能运行 主要是想让外网可以访问本机的django项目 请问该怎么办
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询