1

I installed Python 3.6, 3.5 and 3.7 on Ubuntu 20. When I want to install something on virtualenv with these versions, it give me this error:

Traceback (most recent call last):
  File "/home/msepehr/Downloads/emotion_ramezan/emotion-dev/venv/bin/pip", line 5, in <module>
    from pip._internal.cli.main import main
  File "/home/msepehr/Downloads/emotion_ramezan/emotion-dev/venv/lib/python3.7/site-packages/pip/_internal/cli/main.py", line 10, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/home/msepehr/Downloads/emotion_ramezan/emotion-dev/venv/lib/python3.7/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/home/msepehr/Downloads/emotion_ramezan/emotion-dev/venv/lib/python3.7/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
  File "/home/msepehr/Downloads/emotion_ramezan/emotion-dev/venv/lib/python3.7/site-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
    from pip._internal.exceptions import CommandError
  File "/home/msepehr/Downloads/emotion_ramezan/emotion-dev/venv/lib/python3.7/site-packages/pip/_internal/exceptions.py", line 10, in <module>
    from pip._vendor.six import iteritems
ModuleNotFoundError: No module named 'pip._vendor.six'

What's wrong?

1 Answer 1

1

For ubuntu 20.04+ use following way to create virtual env

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update

sudo apt install python3.7-venv
python3.7 -m venv my_venv37

sudo apt install python3.8-venv
python3.8 -m venv my_venv38

Not the answer you're looking for? Browse other questions tagged or ask your own question.