这是新的。无法从python manage.py runserver运行localserver。给出以下错误
(venv) C:\Users\DeeDee\Desktop\dtre_project\btre>python manage.py runserver
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "C:\Users\DeeDee\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "C:\Users\DeeDee\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\DeeDee\Desktop\dtre_project\venv\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper
fn(*args, **kwargs)
..bla bla bla. and last line
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '<frozen importlib._bootstrap>'
将Python脚本的文件夹添加到系统路径变量中,然后通过
py -m pip install Django
再次安装Django例如,我的脚本路径是:
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\Scripts
因为我是通过VisualStudio安装python的相关问题 更多 >
编程相关推荐