$ pip install pandas
Downloading/unpacking pandas
Downloading pandas-0.15.2-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (6.7MB): 6.7MB downloaded
Downloading/unpacking numpy>=1.7.0 (from pandas)
Downloading numpy-1.9.1-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.6MB): 3.6MB downloaded
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /usr/local/lib/python2.7/site-packages (from pandas)
Downloading/unpacking pytz>=2011k (from pandas)
Downloading pytz-2014.10-py2.py3-none-any.whl (477kB): 477kB downloaded
Requirement already satisfied (use --upgrade to upgrade): six in /usr/local/lib/python2.7/site-packages (from python-dateutil->pandas)
Installing collected packages: pandas, numpy, pytz
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 671, in install
self.move_wheel_files(self.source_dir, root=root)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 901, in move_wheel_files
pycompile=self.pycompile,
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/wheel.py", line 215, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/wheel.py", line 209, in clobber
shutil.copy2(srcfile, destfile)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 130, in copy2
copyfile(src, dst)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/numpy/__config__.pyc'
Storing debug log for failure in /Users/tmsanrinsha/.pip/pip.log
ʻIOError: [Errno 13] Permission denied:'/usr/local/lib/python2.7/site-packages/numpy/config.pyc'` I just noticed that it seems that the installation of numpy was bad.
However, I didn't understand it during the work, so I thought it would work if I executed the script of fonnesbeck / ScipySuperpack @ GitHub.
$ curl 'https://raw.githubusercontent.com/fonnesbeck/ScipySuperpack/master/install_superpack.sh' | sh
I noticed this now, but there is a wording stty: stdin isn't a terminal
in the middle, and the selection after that
Would you like to use Python 2.7 or Python 3.4? (2/3)
Can't select with
Invalid selection. Quitting.
And failed. So as written on the site
$ curl -o install_superpack.sh https://raw.githubusercontent.com/fonnesbeck/ScipySuperpack/master/install_superpack.sh
$ sh install_superpack.sh
Seems to need to. However, when I tried it now, there are various things, so it may be better to stop this.
So, I wondered if numpy was bad, and when I did pip install numpy
, I got the same error as pip install pandas
, so I thought pip was suspicious.
$ pip install -U pip
After
$ pip install -U numpy
Then the error changed,
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources.py", line 2951, in <module>
File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources.py", line 563, in _build_master
File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources.py", line 576, in _build_from_requirements
File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources.py", line 755, in resolve
pkg_resources.DistributionNotFound: pip==1.5.6
It became. As you'll see later, this is an error caused by updating pip.
I wonder if python is bad
$ brew uninstall python
$ brew install python --build-fromsource
I did, but it didn't change.
$ brew uninstall numpy
$ brew install numpy
Then
Warning: It looks like the deprecated gfortran formula is installed.
This causes build problems with numpy. gfortran is now provided by
the gcc formula. Please run:
brew rm gfortran
brew install gcc
I got this message,
$ brew rm gfortran
$ brew install gcc
$ brew install numpy
Then
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink lib/python2.7/site-packages/numpy/__config__.py
Target /usr/local/lib/python2.7/site-packages/numpy/__config__.py
already exists. You may want to remove it:
rm '/usr/local/lib/python2.7/site-packages/numpy/__config__.py'
To force the link and overwrite all conflicting files:
brew link --overwrite numpy
To list all files that would be deleted:
brew link --overwrite --dry-run numpy
Possible conflicting files are:
/usr/local/lib/python2.7/site-packages/numpy/__config__.py
/usr/local/lib/python2.7/site-packages/numpy/__init__.py
I got the error. This seems to be the cause of the error that appeared in pip install pandas
.
$ brew link --overwrite numpy
And solve it.
After that, I found an article about pip error Python --What to do if pip issues DistributionError in Homebrew --Qiita, so it is written there. like
$ rm /usr/local/bin/pip /usr/local/bin/pip2 /usr/local/bin/pip2.7
$ python -m pip install --upgrade --force-reinstall pip
Then I solved it and was able to pip install pandas
.
After all, the error I got with the first pip install pandas
is
IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/numpy/__config__.pyc'
There is a problem with numpy. To solve this, uninstall and install numpy. However, I got an error, so follow it.
$ brew uninstall numpy
$ brew rm gfortran
$ brew install gcc
$ brew install numpy
$ brew link --overwrite numpy
Also, the error that came out because I updated pip on the way
$ rm /usr/local/bin/pip /usr/local/bin/pip2 /usr/local/bin/pip2.7
$ python -m pip install --upgrade --force-reinstall pip
It will be solved by.
Recommended Posts