0
votes

I am trying to install NumPy on my MacOS 10.10 with Python 3.6. I am new to Python. I get the errors shown below. I would greatly appreciate any suggestions to overcome this. I tried the following:

First Approach $ brew install homebrew/python/numpy Error: /usr/local/Cellar is not writable. You should change the ownership and permissions of /usr/local/Cellar back to your user account: sudo chown -R $(whoami) /usr/local/Cellar ==> Tapping homebrew/python fatal: could not create work tree dir '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-python': Permission denied Error: Failure while executing: git clone https://github.com/Homebrew/homebrew-python /usr/local/Homebrew/Library/Taps/homebrew/homebrew-python --depth=1

Second Approach $ pip3 install numpy Collecting numpy Using cached numpy-1.12.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl Installing collected packages: numpy Exception: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/commands/install.py", line 342, in run prefix=options.prefix_path, File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/req/req_set.py", line 784, in install **kwargs File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/req/req_install.py", line 851, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files isolated=self.isolated, File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/wheel.py", line 345, in move_wheel_files clobber(source, lib_dir, True) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/wheel.py", line 316, in clobber ensure_dir(destdir) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/utils/init.py", line 83, in ensure_dir os.makedirs(path) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy' $

1
It seems you have problems with user permissions on your computer. For the second approach, did you try $ sudo pip3 ....?yevgeniy

1 Answers

1
votes

use the anaconda distribution! it will install inside your user directories and save you any sudo headaches. And get you a functioning numpy/scipy stack.

https://www.continuum.io/downloads