Answer the question
In order to leave comments, you need to log in
How to create a Django project in PyCharm on windows 11 and fix attribute error?
I'm trying to create a project in PyCharm
Python version 3.10.4 I
get this error, please help me fix it
Using base prefix 'C:\\Python310'
New python executable in C:\Users\ow3lc\PycharmProjects\untitled2\venv\Scripts\python.exe
C:\Users\ow3lc\AppData\Local\Temp\tmppycharm-management\virtualenv.py:22: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
import distutils.spawn
C:\Users\ow3lc\AppData\Local\Temp\tmppycharm-management\virtualenv.py:23: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
import distutils.sysconfig
Traceback (most recent call last):
File "C:\Users\ow3lc\AppData\Local\Temp\tmppycharm-management\virtualenv.py", line 2567, in <module>
main()
File "C:\Users\ow3lc\AppData\Local\Temp\tmppycharm-management\virtualenv.py", line 783, in main
create_environment(
File "C:\Users\ow3lc\AppData\Local\Temp\tmppycharm-management\virtualenv.py", line 1071, in create_environment
install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages=site_packages, clear=clear, symlink=symlink)
File "C:\Users\ow3lc\AppData\Local\Temp\tmppycharm-management\virtualenv.py", line 1650, in install_python
fix_local_scheme(home_dir, symlink)
File "C:\Users\ow3lc\AppData\Local\Temp\tmppycharm-management\virtualenv.py", line 1736, in fix_local_scheme
if sysconfig._get_default_scheme() == "posix_local":
AttributeError: module 'sysconfig' has no attribute '_get_default_scheme'. Did you mean: 'get_default_scheme'?
Answer the question
In order to leave comments, you need to log in
The problem, judging by the traceback, is in the virtual environment, probably in its version, which may not be compatible with the latest version of python.
Possible solutions:
pip install --upgrade virtualenv
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question