我正在尝试构建一个docker镜像。我有一个install.sh文件,它将在构建时运行。install.sh的内容如下
sudo apt-get install -y python-dev python3.5 python3.5-dev
# Install virtualenv
sudo wget https://bootstrap.pypa.io/ez_setup.py -O /tmp/ez_setup.py
sudo python3.5 /tmp/ez_setup.py
sudo easy_install-3.5 pip
pip3.5 install virtualenv
#pip install -U cffi
virtualenv -p python3.5 $HOME/venv/3.5
# Install pip packages
. $HOME/venv/3.5/bin/activate
pip install pyopenssl ndg-httpsclient pyasn1
pip install nose mock pytest coverage
CFLAGS="-O0" pip install lxml
deactivate
当pip install pyopenssl ndg-httpsclient pyasn1
执行时,我收到以下错误
running install_egg_info
Copying src/cryptography.egg-info to build/bdist.linux-x86_64/wheel/cryptography-1.1.1-py3.5.egg-info
running install_scripts
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-ytr1o8ux/cryptography/setup.py", line 318, in <module>
**keywords_with_side_effects(sys.argv)
File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/root/venv/3.5/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 213, in run
archive_basename = self.get_archive_basename()
File "/root/venv/3.5/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 161, in get_archive_basename
impl_tag, abi_tag, plat_tag = self.get_tag()
File "/root/venv/3.5/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 155, in get_tag
assert tag == supported_tags[0]
AssertionError
----------------------------------------
Running setup.py bdist_wheel for cffi
Failed building wheel for cryptography
看完此链接后,我尝试使用更新的车轮套件
wget http://nipy.bic.berkeley.edu/scipy_installers/wheel-0.24.0-py2.py3-none-any.whl
pip install wheel-0.24.0-py2.py3-non-any.whl
还是一样的错误。尽管出现此错误,但映像已成功构建。任何帮助将不胜感激。
提前致谢。
wheel
如票证中所述,这似乎是与包装有关的问题:https : //bitbucket.org/pypa/wheel/issues/146/wheel-building-fails-on-cpython-350b3
wheel
在virtualenv中进行升级应该可以解决该问题(目前为版本0.26.0
)。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句