My pip died after I tried add path to PATH

Viewed 45

I had a pip that worked ok, but then I did:

PATH=$PATH:C:\Users\Lior\AppData\Roaming\Python\Python39\Scripts

to fix the tensorflow import problem ImportError: No module named tensorflow

and after that pip is no longer recognized, when I type:

pip install tensorflow --ignore-installed --user

It response by:

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

How I fix it back?

2 Answers

On Windows, variables (including environment variables) are expanded with % sign like %PATH%, not like $PATH. In addition to this, path separator is a semicolon ;, not colon : (source 1, source 2).

So to set it properly, you'd have to set it to

PATH=%PATH%;C:\Users\Lior\AppData\Roaming\Python\Python39\Scripts

Hope it helps!

Check Python and pip is in PATH using command: "where python" or "where pip"

You can set PATH as "set PATH=C:\Users\Lior\AppData\Roaming\Python\Python39\Scripts;%PATH%" Now on success of the above steps, proceed with installation of tensorflow. "pip install tensorflow --ignore-installed --user" or "python -m pip install tensorflow --ignore-installed --user"

Related