Я создал проект в virtualenv на windows, а затем попытался запустить его, и произошла эта ошибка:
Traceback (most recent call last):
File "C:\Windows\System32\django\.venv\lib\site-packages\django\core\management\base.py", line 328, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Windows\System32\django\.venv\lib\site-packages\django\core\management\commands\runserver.py", line 60, in execute
super().execute(*args, **options)
File "C:\Windows\System32\django\.venv\lib\site-packages\django\core\management\base.py", line 369, in execute
output = self.handle(*args, **options)
File "C:\Windows\System32\django\.venv\lib\site-packages\django\core\management\commands\runserver.py", line 67, in handle
if not settings.DEBUG and not settings.ALLOWED_HOSTS:
File "C:\Windows\System32\django\.venv\lib\site-packages\django\conf\__init__.py", line 76, in __getattr__
self._setup(name)
File "C:\Windows\System32\django\.venv\lib\site-packages\django\conf\__init__.py", line 63, in _setup
self._wrapped = Settings(settings_module)
File "C:\Windows\System32\django\.venv\lib\site-packages\django\conf\__init__.py", line 142, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'C:\\Python39\\Lib\\site-packages\\django\\conf'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Windows\System32\django\django_project\manage.py", line 21, in <module>
main()
File "C:\Windows\System32\django\django_project\manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "C:\Windows\System32\django\.venv\lib\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line
utility.execute()
File "C:\Windows\System32\django\.venv\lib\site-packages\django\core\management\__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Windows\System32\django\.venv\lib\site-packages\django\core\management\base.py", line 341, in run_from_argv
connections.close_all()
File "C:\Windows\System32\django\.venv\lib\site-packages\django\db\utils.py", line 225, in close_all
for alias in self:
File "C:\Windows\System32\django\.venv\lib\site-packages\django\db\utils.py", line 219, in __iter__
return iter(self.databases)
File "C:\Windows\System32\django\.venv\lib\site-packages\django\utils\functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\Windows\System32\django\.venv\lib\site-packages\django\db\utils.py", line 153, in databases
self._databases = settings.DATABASES
File "C:\Windows\System32\django\.venv\lib\site-packages\django\conf\__init__.py", line 76, in __getattr__
self._setup(name)
File "C:\Windows\System32\django\.venv\lib\site-packages\django\conf\__init__.py", line 63, in _setup
self._wrapped = Settings(settings_module)
File "C:\Windows\System32\django\.venv\lib\site-packages\django\conf\__init__.py", line 142, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'C:\\Python39\\Lib\\site-packages\\django\\conf'
вот мои версии приложений
- asgiref 3.2.7
- Django 3.0.5
- pip 20.0.2
- pytz 2019.3
- setuptools 41.2.0
- sqlparse 0.3.1
- Мои файлы:
- manage.py
- django_project:
- asgi.py
- settings.py
- urls.py
- wsgi.py
- init .py
Я пытаюсь построить virtualenv в проект и до сих пор не работает.
, пожалуйста, помогите мне:)