我和一个朋友正试图通过DigitalOcean设置一个不和谐的机器人。然而,当我们运行命令“sudo-H pip3.5 install--upation-r要求. txt
”或类似的命令时,它总是以相同的错误告终。我们已经尝试过安装python,它已经是最新的了。
这是日志。
You may need to use sudo to install dependencies.
root@discord-bot:~/RadioOP#sudo-H pip3.5 install--升级-r要求. txt收集https://github.com/Rapptz/discord.py/archive/async.zip(from-r要求.txt(line 1))下载https://github.com/Rapptz/discord.py/archive/async.zip(442kB)100% |████████████████████████████████| 450kB 2.5MB/s收集youtube_dl
No working compiler found, or bogus compiler options
passed to the compiler from Python's distutils module.
See the error messages above.
(If they are about -mno-fused-madd and you are on OS/X 10.8,
see http://stackoverflow.com/questions/22313407/ .)
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 243, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 273, in run
return func()
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 242, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-7oxtbavt/cffi-1.6.0/setup.py", line 111, in <module>
File "/tmp/easy_install-7oxtbavt/cffi-1.6.0/setup.py", line 65, in ask_supports_thread
File "/tmp/easy_install-7oxtbavt/cffi-1.6.0/setup.py", line 52, in no_working_compiler_found
SystemExit: 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 1101, in run_setup
run_setup(setup_script, args)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 246, in run_setup
raise
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 243, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 273, in run
return func()
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 242, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-7oxtbavt/cffi-1.6.0/setup.py", line 111, in <module>
File "/tmp/easy_install-7oxtbavt/cffi-1.6.0/setup.py", line 65, in ask_supports_thread
File "/tmp/easy_install-7oxtbavt/cffi-1.6.0/setup.py", line 52, in no_working_compiler_found
SystemExit: 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-qb7qi39t/PyNaCl/setup.py", line 259, in <module>
"Programming Language :: Python :: 3.5",
File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python3.5/dist-packages/setuptools/dist.py", line 269, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/lib/python3.5/dist-packages/setuptools/dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 1092, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 1104, in obtain
return installer(requirement)
File "/usr/local/lib/python3.5/dist-packages/setuptools/dist.py", line 380, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 665, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 695, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 876, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 1115, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 1103, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with 1
----------------------------------------
命令"pythonsetup.pyegg_info"失败与错误代码1在 /tmp/pip-build-qb7qi39t/PyNaCl/
提前感谢您的帮助。
嗯,我通过问“不和谐API”解决了这个问题
以下是我如何修复它:
sudo apt安装构建必备
然后
sudo apt安装构建必备libffi-dev python3.5-dev
然后我运行了我的命令
Pip试图下载PyNaCL,它需要从源代码编译Python扩展模块。为此,您需要安装正确的开发库和ofc工作编译器设置。因此消息no_working_compiler_found
。您可以尝试为PyNaCL找到一个完整的二进制轮子,手动安装,然后再次运行您的原始安装命令。