2

My problem is when i try to install virtualenv by using pip3 in powershell the command doesn't do anything aside from the frase "Collecting Virtualenv", it stays the same forever and i don't know what error or thing is interfering with the procedure. I already assure that its not an internet error because my connection is stable and fast so i dont think is that... The only thing that could cause this problem is that my computer is slow, but i don't know if that could interfere since i already installed everything with relative ease.

Here's a picture of the problem for reference. Pip3 install virtualenv problem

[UPDATE]So i tried this suggestion about writing the command -v or --verbose in the pip3 install process, and what i got was this text right here and in the end of the process there is this "caching due to etag", can someone give me some insight in this? image related to the update.pip3 install virtualenv update

2
  • 2
    Can you try adding the -v or --verbose option to pip3 install? That should display some console output of the download+install process, to get more info where it hangs. Commented Nov 8, 2018 at 2:28
  • @Claudio use the --no-cache-dir flag on pip Commented Nov 8, 2018 at 3:36

2 Answers 2

1

Try doing sudo pip3 install virtualenv

If it gives any error like:

ImportError: cannot import name 'main'

then try : sudo su and then pip3 install virtualenv

I am not sure why the above command works and earlier one doesn't :<.

Sign up to request clarification or add additional context in comments.

Comments

0

I often resort to calling pip as a module from python and using a specified python version, e.g. sudo -H python3.7 -m pip install virtualenv

The command explained;

sudo: install to system as sudo user

-H: The -H (HOME) option requests that the security policy set the HOME environment variable to the home directory of the target user.

python{py-version}: just use your usual python version.

-m: use as a python module.

pip: no need for pip3 as its called from the correct python version

[UPDATE] As the OP has updated his question I will update my answer. If the error "caching due to etag" is seen then use pip's --no-cache-dir flag.

1 Comment

Once you get virtualenv installed, be sure not to use sudo with pip install since you'll want to install packages into the virtualenv

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.