1

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?

Mohan Radhakrishnan
  • 3,002
  • 5
  • 28
  • 42
lior1zh2000
  • 103
  • 1
  • 10

2 Answers2

1

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!

Herman S.
  • 31
  • 1
  • 3
0

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"