有研究odoo10中docker怎么安装pysftp
-
登入docker安装pip install pysftp,错误信息退出
/usr/lib/python2.7# pip install pysftp
Downloading/unpacking pysftp
Downloading pysftp-0.2.9.tar.gz
Running setup.py (path:/tmp/pip-build-327rFu/pysftp/setup.py) egg_info for package pysftpno previously-included directories found matching 'docs/_build'
Downloading/unpacking paramiko>=1.17 (from pysftp)
Downloading paramiko-2.4.1-py2.py3-none-any.whl (194kB): 194kB downloaded
Downloading/unpacking pyasn1>=0.1.7 (from paramiko>=1.17->pysftp)
Downloading pyasn1-0.4.3-py2.py3-none-any.whl (72kB): 72kB downloaded
Downloading/unpacking bcrypt>=3.1.3 (from paramiko>=1.17->pysftp)
Downloading bcrypt-3.1.4.tar.gz (42kB): 42kB downloaded
Running setup.py (path:/tmp/pip-build-327rFu/bcrypt/setup.py) egg_info for package bcryptwarning: no previously-included files found matching 'requirements.txt' warning: no previously-included files found matching 'tasks.py' warning: no previously-included files found matching '.travis.yml' warning: no previously-included files found matching 'wheel-scripts' warning: no previously-included files found matching 'Jenkinsfile' warning: no previously-included files found matching '.jenkins' warning: no previously-included files matching '*' found under directory '.jenkins' warning: no previously-included files matching '*' found under directory 'wheel-scripts' no previously-included directories found matching '.travis'
Downloading/unpacking pynacl>=1.0.1 (from paramiko>=1.17->pysftp)
Downloading PyNaCl-1.2.1.tar.gz (3.3MB): 3.3MB downloaded
Running setup.py (path:/tmp/pip-build-327rFu/pynacl/setup.py) egg_info for package pynacl
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
unable to execute 'x86_64-linux-gnu-gcc': No such file or directoryNo working compiler found, or bogus compiler options passed to the compiler from Python's standard "distutils" module. See the error messages above. Likely, the problem is not related to CFFI but generic to the setup.py of any Python package that tries to compile C code. (Hints: on OS/X 10.8, for errors about -mno-fused-madd see http://stackoverflow.com/questions/22313407/ Otherwise, see https://wiki.python.org/moin/CompLangPython or the IRC channel #python on irc.freenode.net.) Traceback (most recent call last): File "<string>", line 17, in <module> File "/tmp/pip-build-327rFu/pynacl/setup.py", line 251, in <module> "Programming Language :: Python :: 3.6", File "/usr/lib/python2.7/distutils/core.py", line 111, in setup _setup_distribution = dist = klass(attrs) File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 262, in __init__ self.fetch_build_eggs(attrs['setup_requires']) File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 287, in fetch_build_eggs replace_conflicting=True, File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 631, in resolve dist = best[req.key] = env.best_match(req, ws, installer) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 874, in best_match return self.obtain(req, installer) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 886, in obtain return installer(requirement) File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 338, in fetch_build_egg return cmd.easy_install(req) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 636, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 666, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 856, in install_eggs return self.build_and_install(setup_script, setup_base) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1078, in build_and_install self.run_setup(setup_script, setup_base, args) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1066, in run_setup raise DistutilsError("Setup script exited with %s" % (v.args[0],)) distutils.errors.DistutilsError: Setup script exited with 1 Complete output from command python setup.py egg_info: unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
No working compiler found, or bogus compiler options passed to the compiler from Python's standard "distutils" module. See the error messages above. Likely, the problem is not related to CFFI but generic to the setup.py of any Python package that tries to compile C code. (Hints: on OS/X 10.8, for errors about -mno-fused-madd see http://stackoverflow.com/questions/22313407/ Otherwise, see https://wiki.python.org/moin/CompLangPython or the IRC channel #python on irc.freenode.net.)
Traceback (most recent call last):
File "", line 17, in
File "/tmp/pip-build-327rFu/pynacl/setup.py", line 251, in
"Programming Language :: Python :: 3.6",
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 262, in init
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 287, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 631, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 874, in best_match
return self.obtain(req, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 886, in obtain
return installer(requirement)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 338, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 636, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 666, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 856, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1078, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1066, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with 1
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-327rFu/pynacl
Storing debug log for failure in /root/.pip/pip.log -
error log里往往有问题的原因。与其求人,不如自己认真看一下。
你的错误信息里有下面一句:unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
这表示这个python模块是需要用gcc编译器编译的,你的docker环境中并没有安装gcc编译器。提醒一下,即使安装了gcc编译器,可能还会报错,因为你可能还需要头文件,关联动态库等。但,只要学会看log,就都能一一解决,建议参照我的同事的文章:
https://mp.weixin.qq.com/s/RMLwuqIjvz9Js_d-_2iLDw另外,提问的朋友在编辑提问贴前请学习点最基本的Markdown语法, 不要丢一堆混乱格式的error log让人家去猜,谢谢!
-
@digitalsatori 在 有研究odoo10中docker怎么安装pysftp 中说:
gcc
谢谢指点,其实 apt install gcc 是有测试过的,也是安装不上的,可能也是少了什么库