Tensorflow Installation Resolution

I am trying to install TensorFlow on Anaconda (My Python - version 3.5.2).

When I run:

(tensorflow)C:> pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.1-cp35-cp35m-win_amd64.whl 

According to the manual at Tensorflow.org, the following tips appear:

 Exception: Traceback (most recent call last): File "C:\Users\Anaconda3\lib\site-packages\pip\basecommand.py", line 215, in main status = self.run(options, args) File "C:\Users\Anaconda3\lib\site-packages\pip\commands\install.py", line 317, in run prefix=options.prefix_path, File "C:Anaconda3\lib\site-packages\pip\req\req_set.py", line 742, in install **kwargs File "C:\Users\Anaconda3\lib\site-packages\pip\req\req_install.py", line 831, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) File "C:\Users\Anaconda3\lib\site-packages\pip\req\req_install.py", line 1032, in move_wheel_files isolated=self.isolated, File "C:\Users\Anaconda3\lib\site-packages\pip\wheel.py", line 346, in move_wheel_files clobber(source, lib_dir, True) File "C:\Users\Anaconda3\lib\site-packages\pip\wheel.py", line 324, in clobber shutil.copyfile(srcfile, destfile) File "C:\Users\Anaconda3\lib\shutil.py", line 115, in copyfile with open(dst, 'wb') as fdst: PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Anaconda3\\Lib\\site-packages\\numpy\\core\\multiarray.cp35-win_amd64.pyd' 

I do not know what causes this error. Can anyone help me with this?

+5
source share
8 answers

Maybe late, but I got the same error and it happened. My problem was that there was some file that was used inside numpy, which was blocked by anaconda (or some other process), I think this file is also needed for tensor flow. So I got permission. All I did was shut down every process anaconda, jupyter etc. And it started:

 1) conda update --all 2) pip install --ignore-installed tensorflow 

Open your cmd as administrator and do not activate shadoworflow. Just just shoot commands from your cmd. For example: C:\\> pip install --ignore-installed tensorflow (your directory may be different) should be fine. Let me know if you are stuck.

+14
source

Run the cmd console as an administrator, then complete the installation.

You can enter the cmd command in run or Cortana, then right-click on the console and choose run as administrator.

+1
source

I had the same problem on multiple Windows machines (W7, W8.1 and W10). Finally, I solved the problem the same way in all of them:

  • Remove Anaconda
  • Download Anaconda3-4.2.0 from the Anaconda Installer Archive . This version of Anaconda includes Python 3.5.2. TensorFlow only supports version 3.5.x of Python for Windows. Although you can create an environment with version 3.5 in Python, I recommend installing Anaconda 4.2.0
  • Install Anaconda3-4.2.0 to a different drive than the Windows drive, for example, in D: \ Programdata \ Anaconda3. Although installation on a different drive is no longer required, it is best to choose to install for all users.
  • Open Anaconda Promp with administrator privileges and:
  • Create an environment called tensorflow by calling the following command:

    conda create -n tensorflow python=3.5

  • Activate the conda environment by running the following command:

    activate tensorflow

  • Install TensorFlow:

    conda install -c conda-forge tensorflow

  • At least install Jupyter and Spyder, but for sure you will also need to install scipy:

    conda install spyder

    conda install jupyter

  • After that, you can check if everything is correct by calling python and try the following program:

     import tensorflow as tf hail = tf.constant('Hello World') session = tf.Session() print(session.run(hail)) 
  • Now you can check if Spyder is working. Exit Python, call Spyder from the Anaconda prompt, and try running the program.

  • If you have any problems with iPython, install it in tenorflow.

    conda install ipython

  • If you want to update spyder, write the following command:

    conda update spyder

Remember to start Spyder from the Anaconda prompt after activating the tensor flow environment.

I hope this works for you.

Edited: TensorFlow, starting with version 1.2.0, is compatible with Python 3.6, so you can already install the latest version of Anaconda (4.4.0 | Release Date: May 31, 2017), which includes Python 3.6.

+1
source

I had the same error, and I fixed it by doing conda update --all .

Be careful with updating conda: ( https://github.com/ContinuumIO/anaconda-issues/issues/830 ) Updating packages

 conda: 4.0.5-py35_0 --> 4.1.1-py35_0 conda-env: 2.4.5-py35_0 --> 2.5.0-py35_0 matplotlib: 1.5.1-np110py35_0 --> 1.5.1-np111py35_0 mkl: 11.3.1-0 --> 11.3.3-1 mkl-service: 1.1.2-py35_0 --> 1.1.2-py35_1 numexpr: 2.5-np110py35_0 --> 2.5.2-np111py35_1 numpy: 1.10.4-py35_0 --> 1.11.0-py35_1 pandas: 0.18.0-np110py35_0 --> 0.18.1-np111py35_0 scikit-learn: 0.17.1-np110py35_0 --> 0.17.1-np111py35_1 scipy: 0.17.0-np110py35_0 --> 0.17.0-np111py35_4 

will break Scripts / activate.bat on Windows if the installation path contains spaces. (Replacing active.bat with the original just works fine.)

0
source

I had the same error for python 3.6, launched cmd through admin mode, worked like a charm.

0
source

I had permission to reject the problem on windows, but this worked for me:

  • right click on cmd or git console> run as administrator
  • pip install tensorflow
0
source

I had a file blocked from a broken Jupyter launch. Reboot and reinstall as Adm. Things are good.

0
source

I solved the problem below with the command

 pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.1-cp35-cp35m-win_amd64.whl 
-2
source

Source: https://habr.com/ru/post/1266552/


All Articles