请问:各位Python大神,我在MAC上安装Python-rrdtool一直报错如下
(env3) [MrYang:python-rrdtool-1.4.7]$ pip install python-rrdtool
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting python-rrdtool
Downloading http://mirrors.aliyun.com/pypi/packages/99/af/bf46df3104d78591f942278467a1016d056a887c808ed1127207a4e1ebaf/python-rrdtool-1.4.7.tar.gz (1.4MB)
100% |████████████████████████████████| 1.4MB 11.9MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/dx/m2t9qg010gg9pk5v8xzt4gxc0000gn/T/pip-install-xcrz5haf/python-rrdtool/setup.py", line 61
os.chmod(executable, 0777)
^
SyntaxError: invalid token
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/dx/m2t9qg010gg9pk5v8xzt4gxc0000gn/T/pip-install-xcrz5haf/python-rrdtool/
(env3) [MrYang:python-rrdtool-1.4.7]$ python -V
Python 3.6.1
(env3) [MrYang:python-rrdtool-1.4.7]$
改为手动安装后,报错如下
(env3) [MrYang:python-rrdtool-1.4.7]$ python -V
Python 3.6.1
(env3) [MrYang:python-rrdtool-1.4.7]$ python setup.py install
running install
running build
running build_ext
running build_configure
checking build system type... i386-apple-darwin15.6.0
checking host system type... i386-apple-darwin15.6.0
checking target system type... i386-apple-darwin15.6.0
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: in `/Users/MrYang/Downloads/python-rrdtool-1.4.7/rrdtool-1.4.7':
configure: error: C compiler cannot create executables
See `config.log' for more details.
Traceback (most recent call last):
File "setup.py", line 99, in <module>
include_dirs=[include_dir],
File "/usr/local/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.6/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/usr/local/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 68, in run
self.run_command(cmd_name)
File "/usr/local/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 62, in run
subprocess.check_call(executable, cwd=os.path.dirname(executable))
File "/usr/local/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/Users/MrYang/Downloads/python-rrdtool-1.4.7/rrdtool-1.4.7/configure' returned non-zero exit status 77.
(env3) [MrYang:python-rrdtool-1.4.7]$
请问各位大神对于这种问题该如何解决?