简体   繁体   中英

Issue with installing virtualenv for DJango

I am installing virtualenv for my DJango project. I have used:

    virtualenv venv

    virtualenv venv -p {myPath}Python/Python37-32/python

but all of theese have thrown the same error:

    Complete output from command E:\DJango\firstTutor...2\Scripts\python.exe - setuptools pip wheel:
      Traceback (most recent call last):
      File "<stdin>", line 3, in <module>
    ModuleNotFoundError: No module named 'pkgutil'

I am using the latest versions of Python, pip and virtualenv.

Instead of using virtualenv try using the built in python venv . Ie:

python3 -m venv name_of_virtual_environment

If you don't have python3 added to path then replace it with the path to your python.exe

pkgutil is a built-in module so it does not need to be installed when creating a new virtual environment.

Try this python3 -m venv /path/to/new/virtual/environment

python3 -m venv /path/to/new/virtual/environment

For more info you can go below link

[ https://docs.python.org/3/library/venv.html]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM