I tried to make a python virtualenvironment using virtualenv in I type virtuelenv env --python=python3 I get an error

PermissionError: [Errno 1] Operation not permitted: '/mnt/d/venv/bin/python3'

So I used the command with sudo and therefore type sudo virtualenv env --python=python3

The command works this time, now I activate the environment and try to install something using pip, I get

Could not install packages due to an EnvironmentError: [Errno 1] Operation not permitted

I know for a fact that if use pip with sudo, it will install packages for the global site packages and no the site packages of the virtual environment. I want to install things to the virtual environment.

I am running ubuntu bionic on WSL, I used to run ubuntu xenial and didn't face this problem.

please advise.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.