When I attempt to update or install any version of pandas
or pyOpenSSL
(with any instance of sudo pip --[un]install|update [--no-use-wheel] [p
If you are on OSX, the easiest solution in my opinion to avoid errors like you are having is to use Homebrew to manage the installation of Python, pip and libraries like pandas.
If you are already using Homebrew (it was unclear from your question). Try running brew doctor
and see if there are any reported errors.
To get pip
working in concert with Homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
to install Homebrew.
brew doctor
and make sure you get no errors from running this command. Follow what it recommends, especially concerning the $PATH
environment variable.
brew install python
to install Python 2.7 (and pip)
pip install pandas
A likely cause is the presence of multiple versions of setuptools
, with an older version earlier on the Python path than the newer one. This can be temporarily overcome for the purposes of installation by beginning your invocations of pip
with
PYTHONPATH=/PATH_TO_YOUR_CURRENT_PACKAGES/site-packages pip ...
You can confirm that this is the case by executing
import pkg_resources
pkg_resources.__file__
in Python and noting that the pkg_resources.pyc
returned is not in the location of your current site packages.
In some cases this can also be corrected by ensuring that the pkg_resources.pyc
in your site packages directory in executed, rather than the one in your system packages directory (e.g., by deleting the latter).