Like recommended in the Materials Project API tutorial, I’m installing Pymatgen. I am using OS X El Capitan 10.11.4, in which Python 2.7.10 is embedded. I’m following the Pymatgen documentation, have all of the prerequisite programs, but get this error after running “python pmg_install.py” in Bash:
Installing collected packages: numpy, atomicfile, scipy
Found existing installation: numpy 1.8.0rc1
DEPRECATION: Uninstalling a distutils installed project (numpy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Traceback (most recent call last):
File “/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py”, line 103, in copystat
OSError: [Errno 1] Operation not permitted: '/tmp/pip-RXVPjE-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy-1.8.0rc1-py2.7.egg-info’
Error installing pymatgen
It looks like the installation process is trying to uninstall the legacy Numpy program embedded in OS X, then maybe replace it with an updated version. I read that OS X prevents any modification of this directory where Python 2.7.10 and Numpy are located though, for fear that modification to its files will break the operating system. Therefore, installing Pymatgen as the root user or invoking the sudo command does not solve the error. I have the latest, stable version of Python 3.x installed, but the system still defaults to the 2.7.10 version during installation.
Is there a way to install Pymatgen while leaving alone OS X’s existing Python-related files?