New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis CI is failing to build Python 3.3 environment #4

Closed
mattsb42-aws opened this Issue Jun 7, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@mattsb42-aws
Member

mattsb42-aws commented Jun 7, 2018

I have verified the tests all complete with 3.3 locally, and the 3.3 tests run successfully in AppVeyor, this is just an issue with figuring out how to get Travis to build the environment correctly. I suspect that the issue is rooted in it using pip 10, but that will require further investigation.

$ tox
GLOB sdist-make: /home/travis/build/mattsb42-aws/base64io-python/setup.py
py33 create: /home/travis/build/mattsb42-aws/base64io-python/.tox/py33
ERROR: invocation failed (exit code 1), logfile: /home/travis/build/mattsb42-aws/base64io-python/.tox/py33/log/py33-0.log
ERROR: actionid: py33
msg: getenv
cmdargs: ['/home/travis/virtualenv/python3.3.6/bin/python', '-m', 'virtualenv', '--python', '/home/travis/virtualenv/python3.3.6/bin/python', 'py33']
Already using interpreter /home/travis/virtualenv/python3.3.6/bin/python
Using real prefix '/opt/python/3.3.6'
New python executable in /home/travis/build/mattsb42-aws/base64io-python/.tox/py33/bin/python
Installing setuptools, pip, wheel...
  Complete output from command /home/travis/build/m....tox/py33/bin/python - setuptools pip wheel:
  DEPRECATION: Python 3.3 supported has been deprecated and support for it will be dropped in the future. Please upgrade your Python.
Looking in links: /home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages, /home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages/virtualenv_support, /home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages/virtualenv_support
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/7f/e1/820d941153923aac1d49d7fc37e17b6e73bfbd2904959fffbad77900cf92/setuptools-39.2.0-py2.py3-none-any.whl (567kB)
Collecting pip
Collecting wheel
wheel requires Python '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' but the running Python is 3.3.6
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "/opt/python/3.3.6/lib/python3.3/runpy.py", line 160, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/opt/python/3.3.6/lib/python3.3/runpy.py", line 73, in _run_code
    exec(code, run_globals)
  File "/home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages/virtualenv.py", line 2343, in <module>
    main()
  File "/home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages/virtualenv.py", line 712, in main
    symlink=options.symlink)
  File "/home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages/virtualenv.py", line 947, in create_environment
    download=download,
  File "/home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages/virtualenv.py", line 904, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "/home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages/virtualenv.py", line 796, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /home/travis/build/m....tox/py33/bin/python - setuptools pip wheel failed with error code 1
ERROR: Error creating virtualenv. Note that some special characters (e.g. ':' and unicode symbols) in paths are not supported by virtualenv. Error details: InvocationError('/home/travis/virtualenv/python3.3.6/bin/python -m virtualenv --python /home/travis/virtualenv/python3.3.6/bin/python py33 (see /home/travis/build/mattsb42-aws/base64io-python/.tox/py33/log/py33-0.log)', 1)
___________________________________ summary ____________________________________
ERROR:   py33: Error creating virtualenv. Note that some special characters (e.g. ':' and unicode symbols) in paths are not supported by virtualenv. Error details: InvocationError('/home/travis/virtualenv/python3.3.6/bin/python -m virtualenv --python /home/travis/virtualenv/python3.3.6/bin/python py33 (see /home/travis/build/mattsb42-aws/base64io-python/.tox/py33/log/py33-0.log)', 1)
The command "tox" exited with 1.
Done. Your build exited with 1.

https://travis-ci.org/mattsb42-aws/base64io-python/jobs/388544535

mattsb42-aws added a commit to mattsb42-aws/base64io-python that referenced this issue Jun 7, 2018

mattsb42-aws added a commit to mattsb42-aws/base64io-python that referenced this issue Jun 7, 2018

@LevN0

This comment has been minimized.

LevN0 commented Jun 17, 2018

Because I spent an hour trying to figure this out, and Google directed me here:

The root cause seems to be using virtualenv (which Travis does to create the run) version 16.0.0, which supports Python3.3 but also tries to use a wheel version that does not. Adding the following line under install section of travis.yml should work:

  • if [[ $TRAVIS_PYTHON_VERSION == 3.3 ]]; then pip install virtualenv==15.2.0; fi
@mattsb42-aws

This comment has been minimized.

Member

mattsb42-aws commented Jun 18, 2018

@LevN0 Thanks for passing that along! We'll give that a shot.

mattsb42-aws added a commit to mattsb42-aws/base64io-python that referenced this issue Jun 18, 2018

@rmk135

This comment has been minimized.

rmk135 commented Jun 22, 2018

Hi,

I faced the same problem, when travis was running tests for my pet project https://github.com/ets-labs/python-dependency-injector and this fix really helped.

@LevN0 , thanks for sharing the solution!

Roman

hideaki-t added a commit to hideaki-t/igo-python that referenced this issue Jul 20, 2018

lebigot added a commit to lebigot/uncertainties that referenced this issue Jul 31, 2018

@mattsb42-aws

This comment has been minimized.

Member

mattsb42-aws commented Aug 13, 2018

For anyone running across this in the future, we now need to pin tox as well, as of 3.2.0.

if [[ $TRAVIS_PYTHON_VERSION == 3.3 ]]; then pip install virtualenv==15.2.0 tox==3.1.3; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment