I’m having trouble installing virtualenv through Pip install

Asked

Viewed 1,910 times

-2

I’m trying to install the virtualenv to then install Tensorflow. For this I have installed Pip. I am using CMD:

Pip install virtualenv

After installing, when typing virtualenv, appears:

'virtualenv' is not recognized as an internal command or external, a operable program or a batch file.

  • in new versions of Python, use "python -m venv [venv name]" instead of virtualenv.

2 answers

0

Miguel, good night.

First, make sure your Pip is up to date, if you’re not trying to update it, try updating by this command:

python -m pip install --upgrade pip

if you still can’t perform the installation after the update, try using the command:

pip3 install virtualenv

After you fail, try to install virtualenv and create your virtual environment by the code editor you use, repeating the previous steps in the terminal of the code editor you use.

After installation, to create a virtual environment on windows: You need to have Pip installed.

1 - make sure you are in the root folder of your project.

2 - to create your virtual environment, you can do this through your code editor.

3 - Again make sure that you are in the root folder of your project, after that go to the terminal and run the command:

python -m venv nomedoseuambientevirtual

4 - Now you only need to activate your virtual environment through the command:

nomedoseuambientevirtual\Scripts\Activate.bat

5 - To disable your virtual environment run the command:

deactivate

6 - Remember that you can create virtual environments for each project you understand needed.

  • 1

    After trying to use pip3 install virtualenv he shows up this:

  • @Miguelberno, I think the final part of your comment has been cut, at least I am not able to visualize what is after the two points, if you can put again, I thank you.

0

If you are using linux, you can try to install virtuaenv using apt-get.

sudo apt install virtualenv

Browser other questions tagged

You are not signed in. Login or sign up in order to post.