#13238 closed defect (fixed)
Travis CI: ImportError: No module named _md5
Reported by: | Ryan J Ollos | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.20 |
Component: | general | Version: | |
Severity: | normal | Keywords: | travis-ci |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Avoid using openssl from homebrew on building Python 2.6 for OSX in Travis CI. |
Description (last modified by )
https://travis-ci.org/edgewall/trac/jobs/628381820
$ if [ "$TRAVIS_OS_NAME" = osx ]; then test -d $HOME/venv-lib || mkdir $HOME/venv-lib eval "$(pyenv init -)" pyver_latest="$(pyenv install -l | grep -E "^[ ]*${pyver/./\\.}\.[0-9]+$" | tail -1 | tr -d '[:blank:]')" venv="$HOME/venv-$pyver_latest" pyenv install --skip-existing $pyver_latest pyenv shell $pyver_latest pip install --upgrade virtualenv python -m virtualenv $venv source $venv/bin/activate fi Traceback (most recent call last): File "/Users/travis/.pyenv/versions/2.6.9/bin/pip", line 7, in <module> from pip import main File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/site-packages/pip/__init__.py", line 21, in <module> from pip._vendor.urllib3.exceptions import DependencyWarning File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/site-packages/pip/_vendor/urllib3/__init__.py", line 8, in <module> from .connectionpool import ( File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 29, in <module> from .connection import ( File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/site-packages/pip/_vendor/urllib3/connection.py", line 39, in <module> from .util.ssl_ import ( File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/site-packages/pip/_vendor/urllib3/util/__init__.py", line 6, in <module> from .ssl_ import ( File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/site-packages/pip/_vendor/urllib3/util/ssl_.py", line 7, in <module> from hashlib import md5, sha1, sha256 File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/hashlib.py", line 136, in <module> md5 = __get_builtin_constructor('md5') File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/hashlib.py", line 63, in __get_builtin_constructor import _md5 ImportError: No module named _md5 New python executable in /Users/travis/venv-2.6.9/bin/python Installing setuptools<37, pip, wheel<0.30... Complete output from command /Users/travis/venv-2.6.9/bin/python - setuptools<37 pip wheel<0.30: Traceback (most recent call last): File "<stdin>", line 11, in <module> File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/__init__.py", line 21, in <module> File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/_vendor/urllib3/__init__.py", line 8, in <module> File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/_vendor/urllib3/connectionpool.py", line 29, in <module> File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/_vendor/urllib3/connection.py", line 39, in <module> File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/_vendor/urllib3/util/__init__.py", line 6, in <module> File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/_vendor/urllib3/util/ssl_.py", line 7, in <module> File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/hashlib.py", line 136, in <module> md5 = __get_builtin_constructor('md5') File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/hashlib.py", line 63, in __get_builtin_constructor import _md5 ImportError: No module named _md5 ---------------------------------------- ...Installing setuptools<37, pip, wheel<0.30...done. Traceback (most recent call last): File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/runpy.py", line 122, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/runpy.py", line 34, in _run_code exec code in run_globals File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/site-packages/virtualenv.py", line 2349, in <module> main() File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/site-packages/virtualenv.py", line 712, in main symlink=options.symlink) File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/site-packages/virtualenv.py", line 953, in create_environment download=download, File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/site-packages/virtualenv.py", line 904, in install_wheel call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT) File "/Users/travis/.pyenv/versions/2.6.9/lib/python2.6/site-packages/virtualenv.py", line 796, in call_subprocess % (cmd_desc, proc.returncode)) OSError: Command /Users/travis/venv-2.6.9/bin/python - setuptools<37 pip wheel<0.30 failed with error code 1 /Users/travis/.travis/functions: line 118: /Users/travis/venv-2.6.9/bin/activate: No such file or directory The command "if [ "$TRAVIS_OS_NAME" = osx ]; then test -d $HOME/venv-lib || mkdir $HOME/venv-lib eval "$(pyenv init -)" pyver_latest="$(pyenv install -l | grep -E "^[ ]*${pyver/./\\.}\.[0-9]+$" | tail -1 | tr -d '[:blank:]')" venv="$HOME/venv-$pyver_latest" pyenv install --skip-existing $pyver_latest pyenv shell $pyver_latest pip install --upgrade virtualenv python -m virtualenv $venv source $venv/bin/activate fi " failed and exited with 1 during . Your build has been stopped.
Attachments (0)
Change History (9)
comment:1 by , 5 years ago
Description: | modified (diff) |
---|---|
Summary: | Travis CI Python 2.6: ImportError: No module named _md5 → Travis CI: ImportError: No module named _md5 |
comment:2 by , 5 years ago
follow-up: 4 comment:3 by , 5 years ago
After cache is deleted, the ImportError
has gone. However, PostgreSQL bindings is unable to load yet.
follow-up: 5 comment:4 by , 5 years ago
After cache is deleted, the
ImportError
has gone. However, PostgreSQL bindings is unable to load yet.
Ah, I noticed that pyenv failed to build Python 2.6. Unfortunately, CI was not stopped even failing build Python. It seems that pyenv exits with 0.
comment:5 by , 5 years ago
Replying to Jun Omae:
After cache is deleted, the
ImportError
has gone. However, PostgreSQL bindings is unable to load yet.Ah, I noticed that pyenv failed to build Python 2.6. Unfortunately, CI was not stopped even failing build Python. It seems that pyenv exits with 0.
Python 2.6 requires openssl 1.0.x but openssl from homebrew is 1.1 now. It is unable to build Python 2.6 with openssl 1.1. I think we have no choice but to remove jobs for python 2.6 on macosx in .travis.yml. Thoughts?
comment:6 by , 5 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
Python 2.6 is successfully built on Mac OS X in Travis CI and all tests pass.
- https://travis-ci.org/jun66j5/trac/builds/634189818
- https://github.com/jun66j5/trac/commit/7eb98bfb54f5b8511177086062b594b2a46eb5e1
- Remove
--if has_broken_mac_openssl
from python-build recipe to ignore openssl from homebrew and install openssl-1.0.2 to local. - Stop the job when building python via pyenv is failing.
- Remove
I'll push the changes if no objections.
comment:7 by , 5 years ago
Oh I see. The OSX pyver=2.6
builds are currently passing, but they are actually running against Python 2.7.
No objections to the workaround.
comment:8 by , 5 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Also, some problems loading PostgreSQL bindings on 1.0-stable: https://travis-ci.org/edgewall/trac/jobs/628381820