我刚去我正在处理的Django项目中运行Django开发服务器,就知道了...
(baseballwebenv) C:\DjangoProjects\BaseballWebsite\baseballweb>python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 8, in <module>
from django.core.management import execute_from_command_line
File "C:\Users\Nick\Anaconda3\envs\baseballwebenv\lib\site-packages\django\__init__.py", line 1, in <module>
from django.utils.version import get_version
File "C:\Users\Nick\Anaconda3\envs\baseballwebenv\lib\site-packages\django\utils\version.py", line 4, in <module>
import subprocess
File "c:\users\nick\anaconda3\Lib\subprocess.py", line 178, in <module>
from _winapi import (CREATE_NEW_CONSOLE, CREATE_NEW_PROCESS_GROUP,
ImportError: cannot import name 'ABOVE_NORMAL_PRIORITY_CLASS'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 14, in <module>
) from exc
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?
您可以通过runserver命令看到我在,我在我的虚拟环境中。我最近升级了我的所有Anaconda软件包,认为所有内容都在虚拟环境中得到了保护。我怀疑这个问题与此有关,但我不确定。如何启动我的项目并再次运行?如果有人想查看某些文件,我也可以添加这些文件。