Prajwal R
Prajwal R

Reputation: 157

Tensorflow in python 3.9 Installation error : failure to install tensorflow [WinError 2]

While installing TensorFlow on Windows having python 3.9 installed using the following command:

pip install tensorflow

Following error occurred with the warning:

WARNING: Failed to write executable - trying to use .deleteme logic

ERROR: Could not install packages due to an OSError: [WinError 2] 
The system cannot find the file specified: 'c:\\python39\\Scripts\\pyrsa-decrypt.exe'
-> 'c:\\python39\\Scripts\\pyrsa-decrypt.exe.deleteme' 

How this can be resolved?

Upvotes: 16

Views: 28393

Answers (5)

shailesh singh
shailesh singh

Reputation: 1

you can simply add --user at the end , and your problem will solve

Upvotes: 0

Kamran Abbaszade
Kamran Abbaszade

Reputation: 11

In my case: When I am running google colab in local runtime jupyter, I tried next command and it worked for me:

!pip install --user tensorflow

Upvotes: 1

bbartling
bbartling

Reputation: 3494

What seems to be working for me on Windows Python 3.9 is:

pip install --upgrade tensorflow

Just to get it to install without an error.

As mentioned in the documentation. Its even working for a non virtual env on my end.

Upvotes: 0

yatso1
yatso1

Reputation: 31

Just run the cmd as an administrator then retype the command pip install tensorflow it will take over from where the error occured.

Upvotes: 1

Gautamrk
Gautamrk

Reputation: 1244

Run the same command using

--user

pip install --user package_name

or you can try to restart the terminal and run it as admin

Upvotes: 54

Related Questions