13

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?

jdk
  • 451
  • 1
  • 6
  • 18
Prajwal R
  • 117
  • 1
  • 1
  • 8

4 Answers4

50

Run the same command using

--user

pip install --user package_name

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

Gautamrk
  • 1,144
  • 9
  • 12
1

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

yatso1
  • 21
  • 8
  • 1
    This was already mentioned in the other answer. Is there a reason to post a new answer for it? You could upvote the other answer instead. – wovano Oct 17 '21 at 10:34
0

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.

bbartling
  • 3,288
  • 9
  • 43
  • 88
0

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