Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading numpy fails with "Permission denied" error

Tags:

python

numpy

I downloaded a precompiled numpy binary from http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy and tried upgrading my current numpy install on Windows 7 with

pip install --upgrade "numpy-1.10.4 vanilla-cp27-none-win32.whl"

I get the following error:

C:\Users\Jeroen\AppData\Local\Enthought\Canopy\User\Scripts\pip-script.py run on 04/01/16 13:20:05
Unpacking c:\users\jeroen\downloads\numpy-1.10.4 vanilla-cp27-none-win_amd64.whl
Installing collected packages: numpy
Cleaning up...
Exception:
Traceback (most recent call last):
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\basecommand.py", line 122, in main
    status = self.run(options, args)
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\commands\install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\req.py", line 671, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\req.py", line 901, in move_wheel_files
    pycompile=self.pycompile,
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\wheel.py", line 215, in move_wheel_files
    clobber(source, lib_dir, True)
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\wheel.py", line 209, in clobber
    shutil.copy2(srcfile, destfile)
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.6.2.3262.win-x86_64\lib\shutil.py", line 130, in copy2
    copyfile(src, dst)
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.6.2.3262.win-x86_64\lib\shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: 'C:\\Users\\Jeroen\\AppData\\Local\\Enthought\\Canopy\\User\\Lib\\site-packages\\numpy\\core\\multiarray.pyd'

Some more info about the currently installed version of numpy on my system:

Python 2.7.3 |EPD_free 7.3-2 (32-bit)| (default, Apr 12 2012, 14:30:37) [MSC v.1500 32 bit (Intel)] on win32
Type "credits", "demo" or "enthought" for more information.
>>> import numpy
>>> print numpy.__version__
1.7.1
>>> print numpy.__path__
['C:\\Python27\\lib\\site-packages\\numpy']
like image 426
BioGeek Avatar asked Apr 01 '16 11:04

BioGeek


People also ask

Does Python 3.8 support NumPy?

NumPy 1.22. 0 is a big release featuring the work of 153 contributors spread over 609 pull requests. The Python versions supported by this release are 3.8-3.10.


2 Answers

I had the same message and for me it was simply needing to close eclipse before updating or reinstalling numpy. Not sure why, but this may help people having a similar problem to first make sure everything is closed.

like image 64
timpjohns Avatar answered Nov 16 '22 00:11

timpjohns


I had a similar error message when trying to update numpy to 1.11. What worked for me was deleting the numpy folder manually from Lib/site-packages/ and then installing the whl (through a CMD-Window with admin rights) using the normal pip install command.

like image 26
Henning Avatar answered Nov 15 '22 23:11

Henning