我正在尝试为python 2.7安装ggplot,我使用pip方式如下:
sudo pip install ggplot
但我收到了这个错误:
Downloading/unpacking ggplot
Downloading ggplot-0.11.5-py2.py3-none-any.whl (2.2MB): 2.2MB downloaded
Downloading/unpacking numpy (from ggplot)
Downloading numpy-1.12.0.zip (4.8MB): 4.8MB downloaded
Running setup.py (path:/tmp/pip_build_root/numpy/setup.py) egg_info for package numpy
Running from numpy source directory.
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
Downloading/unpacking patsy>=0.4 (from ggplot)
Downloading patsy-0.4.1-py2.py3-none-any.whl (233kB): 233kB downloaded
Downloading/unpacking pandas (from ggplot)
Downloading pandas-0.19.2.tar.gz (9.2MB): 9.2MB downloaded
Running setup.py (path:/tmp/pip_build_root/pandas/setup.py) egg_info for package pandas
package init file 'pandas/io/tests/sas/__init__.py' not found (or not a regular file)
warning: no files found matching 'README.rst'
no previously-included directories found matching 'doc/build'
warning: no directories found matching 'examples'
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '#*' found anywhere in distribution
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '.DS_Store' found anywhere in distribution
warning: no previously-included files matching '*.png' found anywhere in distribution
Downloading/unpacking six (from ggplot)
Downloading six-1.10.0-py2.py3-none-any.whl
Downloading/unpacking matplotlib (from ggplot)
Downloading matplotlib-2.0.0.tar.gz (53.2MB): 53.2MB downloaded
Running setup.py (path:/tmp/pip_build_root/matplotlib/setup.py) egg_info for package matplotlib
The loking the tail in the file pip.log I found
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1230, in prepare_files
req_to_install.run_egg_info()
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 326, in run_egg_info
command_desc='python setup.py egg_info')
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 715, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/matplotlib
我认为问题是我已经安装了matplotlib,但我卸载了ggplot并重新安装它并得到了同样的错误。我试过
sudo pip install --ignore-installed ggplot
但不行。我很感激任何建议。