我和一位朋友正在尝试通过DigitalOcean设置不和谐机器人。但是,当我们运行命令" sudo -H pip3.5 install --upgrade -r requirements.txt
"或者沿着这些线的东西它总是以相同的错误结束。
我们已经尝试安装python,它已经是最新版了。
以下是日志。
You may need to use sudo to install dependencies.
root @ discord-bot:〜/ RadioOP#sudo -H pip3.5 install --upgrade -r requirements.txt 收集https://github.com/Rapptz/discord.py/archive/async.zip(来自-r requirements.txt(第1行)) 正在下载https://github.com/Rapptz/discord.py/archive/async.zip(442kB) 100%|████████████████████████████████| 450kB 2.5MB / s 收集youtube_dl> = 2016.4.24(来自-r requirements.txt(第2行)) 使用缓存的youtube_dl-2016.6.3-py2.py3-none-any.whl 收集aiohttp< 0.22.0,> = 0.21.0(来自discord.py == 0.10.0a0-> -r requirements.txt(第1行)) 使用缓存的aiohttp-0.21.6.tar.gz 收集websockets == 3.1(来自discord.py == 0.10.0a0-> -r requirements.txt(第1行)) 使用缓存的websockets-3.1.tar.gz 收集PyNaCl == 1.0.1(来自discord.py == 0.10.0a0-> -r requirements.txt(第1行)) 使用缓存的PyNaCl-1.0.1.tar.gz 从命令python setup.py egg_info完成输出:
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
----------------------------------------
命令&#34; python setup.py egg_info&#34;在/ tmp / pip-build-qb7qi39t / PyNaCl /
中出现错误代码1失败提前感谢您的帮助。
答案 0 :(得分:10)
好吧,我通过询问&#34; Discord API来解决问题。&#34;
以下是我如何修理它:
sudo apt install build-essential
然后
sudo apt install build-essential libffi-dev python3.5-dev
然后我运行了我的命令
答案 1 :(得分:0)
Pip试图下载需要从源代码编译python扩展模块的PyNaCL。为此,您需要安装正确的开发库,并且需要一个有效的编译器设置。因此消息no_working_compiler_found
。您可以尝试为PyNaCL找到一个完整的二进制轮,手动安装,然后再次运行原始安装命令。