新年快乐,
我试图在我的 ubuntu 14.04 上安装 ggplot 并收到以下错误消息(代码)
我的 python-dev 2.7.5-5ubuntu3 版本。
我已经做了以下
sudo apt-get update
sudo apt-get upgrade gcc sudo apt-get install python2.7-dev
william@ubuntu:~$ sudo pip install ggplot
[sudo] password for william:
Downloading/unpacking ggplot
Downloading ggplot-0.6.5.tar.gz (8.4MB): 8.4MB downloaded
Running setup.py (path:/tmp/pip_build_root/ggplot/setup.py) egg_info for package ggplot
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python3/dist-packages (from ggplot)
Downloading/unpacking statsmodels (from ggplot)
Downloading statsmodels-0.6.1.tar.gz (7.0MB): 7.0MB downloaded
Running setup.py (path:/tmp/pip_build_root/statsmodels/setup.py) egg_info for package statsmodels
/bin/sh: 1: svnversion: not found
/bin/sh: 1: svnversion: not found
_configtest.c:1:5: warning: conflicting types for built-in function ‘exp’ [enabled by default]
int exp (void);
^
_configtest.o: In function `main':
/tmp/easy_install-1xuwcszp/numpy-1.9.1/_configtest.c:6: undefined reference to `exp'
collect2: error: ld returned 1 exit status
_configtest.c:1:5: warning: conflicting types for built-in function ‘exp’ [enabled by default]
int exp (void);
^
_configtest.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
Running from numpy source directory.
/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/system_info.py:1526: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/system_info.py:1432: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/statsmodels/setup.py", line 449, in <module>
**setuptools_kwargs)
File "/usr/lib/python3.4/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 262, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 287, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 618, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 870, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 882, in obtain
return installer(requirement)
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 338, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 613, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 643, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 833, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 1055, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 1040, in run_setup
run_setup(setup_script, args)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 68, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 114, in run
return func()
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 67, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 43, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/setup.py", line 251, in <module>
self._clean_exclude = ["bspline_ext.c",
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/setup.py", line 243, in setup_package
"""Custom distutils command to clean the .so and .pyc files."""
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/core.py", line 169, in setup
File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/bdist_egg.py", line 152, in run
self.run_command("egg_info")
File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/egg_info.py", line 10, in run
File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 153, in run
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 170, in build_sources
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 329, in build_extension_sources
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 386, in generate_sources
File "numpy/core/setup.py", line 432, in generate_config_h
File "numpy/core/setup.py", line 42, in check_types
File "numpy/core/setup.py", line 293, in check_types
if not os.path.exists(src):
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
non-existing path in 'numpy/distutils': 'site.cfg'
non-existing path in 'numpy/f2py': 'docs'
non-existing path in 'numpy/f2py': 'f2py.1'
non-existing path in 'numpy/lib': 'benchmarks'
_configtest.o: In function `main':
/tmp/easy_install-1xuwcszp/numpy-1.9.1/_configtest.c:6: undefined reference to `exp'
collect2: error: ld returned 1 exit status
_configtest.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
Complete output from command python setup.py egg_info:
/bin/sh: 1: svnversion: not found
/bin/sh: 1: svnversion: not found
_configtest.c:1:5: warning: conflicting types for built-in function ‘exp’ [enabled by default]
int exp (void);
^
_configtest.o: In function `main':
/tmp/easy_install-1xuwcszp/numpy-1.9.1/_configtest.c:6: undefined reference to `exp'
collect2: error: ld returned 1 exit status
_configtest.c:1:5: warning: conflicting types for built-in function ‘exp’ [enabled by default]
int exp (void);
^
_configtest.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
Running from numpy source directory.
/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/system_info.py:1526: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/system_info.py:1432: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/statsmodels/setup.py", line 449, in <module>
**setuptools_kwargs)
File "/usr/lib/python3.4/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 262, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 287, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 618, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 870, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 882, in obtain
return installer(requirement)
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 338, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 613, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 643, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 833, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 1055, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 1040, in run_setup
run_setup(setup_script, args)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 68, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 114, in run
return func()
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 67, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 43, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/setup.py", line 251, in <module>
self._clean_exclude = ["bspline_ext.c",
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/setup.py", line 243, in setup_package
"""Custom distutils command to clean the .so and .pyc files."""
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/core.py", line 169, in setup
File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/bdist_egg.py", line 152, in run
self.run_command("egg_info")
File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/egg_info.py", line 10, in run
File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 153, in run
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 170, in build_sources
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 329, in build_extension_sources
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 386, in generate_sources
File "numpy/core/setup.py", line 432, in generate_config_h
File "numpy/core/setup.py", line 42, in check_types
File "numpy/core/setup.py", line 293, in check_types
if not os.path.exists(src):
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
non-existing path in 'numpy/distutils': 'site.cfg'
non-existing path in 'numpy/f2py': 'docs'
non-existing path in 'numpy/f2py': 'f2py.1'
non-existing path in 'numpy/lib': 'benchmarks'
_configtest.o: In function `main':
/tmp/easy_install-1xuwcszp/numpy-1.9.1/_configtest.c:6: undefined reference to `exp'
collect2: error: ld returned 1 exit status
_configtest.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/statsmodels
Storing debug log for failure in /home/william/.pip/pip.log
william@ubuntu:~$
非常感谢您的帮助