pypa / virtualenv

Virtual Python Environment builder
https://virtualenv.pypa.io
MIT License
4.84k stars 1.03k forks source link

14.0.6 fails to cooperate with tox on Ubuntu 15.10 #869

Closed sdague closed 8 years ago

sdague commented 8 years ago

I attempted to upgrade my tox locally, and in doing so it pulled in the latest virtualenv, which broke my ability to use tox. Backing up to 14.0.5 got me working again.

Here is a log of how things failed:

ribos:~/code/openstack/nova(master)> sudo pip install -U virtualenv
The directory '/home/sdague/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/sdague/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting virtualenv
  Downloading virtualenv-14.0.6-py2.py3-none-any.whl (1.8MB)
    100% |████████████████████████████████| 1.8MB 429kB/s 
Installing collected packages: virtualenv
  Found existing installation: virtualenv 14.0.5
    Uninstalling virtualenv-14.0.5:
      Successfully uninstalled virtualenv-14.0.5
Successfully installed virtualenv-14.0.6
ribos:~/code/openstack/nova(master)> tox -e py27 
py27 create: /home/sdague/code/openstack/nova/.tox/py27
ERROR: invocation failed (exit code 1), logfile: /home/sdague/code/openstack/nova/.tox/py27/log/py27-0.log
ERROR: actionid: py27
msg: getenv
cmdargs: ['/usr/bin/python', '-m', 'virtualenv', '--python', '/usr/bin/python2.7', 'py27']
env: {'VIRTUAL_ENV': '/home/sdague/code/openstack/nova/.tox/py27', 'PYTHONHASHSEED': '285636492', 'OS_TEST_PATH': './nova/tests/unit', 'LANGUAGE': 'en_US', 'LC_ALL': 'en_US.utf-8', 'PATH': '/home/sdague/code/openstack/nova/.tox/py27/bin:/usr/lib/ccache:/home/sdague/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:~/bin'}

New python executable in /home/sdague/code/openstack/nova/.tox/py27/bin/python2.7
Also creating executable in /home/sdague/code/openstack/nova/.tox/py27/bin/python
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 2304, in <module>
    main()
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 705, in main
    symlink=options.symlink)
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 924, in create_environment
    download=download,
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 843, in install_wheel
    cert_data = pkgutil.get_data("pip._vendor.requests", "cacert.pem")
  File "/usr/lib/python2.7/pkgutil.py", line 578, in get_data
    loader = get_loader(package)
  File "/usr/lib/python2.7/pkgutil.py", line 464, in get_loader
    return find_loader(fullname)
  File "/usr/lib/python2.7/pkgutil.py", line 474, in find_loader
    for importer in iter_importers(fullname):
  File "/usr/lib/python2.7/pkgutil.py", line 430, in iter_importers
    __import__(pkg)
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/__init__.py", line 13, in <module>
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/utils/__init__.py", line 26, in <module>
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 3130, in <module>
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 3116, in _call_aside
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 3155, in _initialize_master_working_set
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 956, in subscribe
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 3155, in <lambda>
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 2655, in activate
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 2225, in declare_namespace
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 2194, in _handle_ns
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 2192, in sort_key
ValueError: '/usr/local/lib/python2.7/dist-packages' is not in list
Running virtualenv with interpreter /usr/bin/python2.7

ERROR: InvocationError: /usr/bin/python -m virtualenv --python /usr/bin/python2.7 py27 (see /home/sdague/code/openstack/nova/.tox/py27/log/py27-0.log)
________________________________________________________________________________ summary ________________________________________________________________________________
ERROR:   py27: InvocationError: /usr/bin/python -m virtualenv --python /usr/bin/python2.7 py27 (see /home/sdague/code/openstack/nova/.tox/py27/log/py27-0.log)
Ivoz commented 8 years ago

Does just invoking virtualenv give exactly the same error, e.g $ virtualenv env, or something different?

sdague commented 8 years ago

No, that seems to work fine.

> virtualenv .env
New python executable in /home/sdague/code/openstack/.env/bin/python
Installing setuptools, pip, wheel...done.

> python -m virtualenv --python /usr/bin/python2.7 .venv2
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in /home/sdague/code/openstack/.venv2/bin/python2.7
Also creating executable in /home/sdague/code/openstack/.venv2/bin/python
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 2304, in <module>
    main()
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 705, in main
    symlink=options.symlink)
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 924, in create_environment
    download=download,
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 843, in install_wheel
    cert_data = pkgutil.get_data("pip._vendor.requests", "cacert.pem")
  File "/usr/lib/python2.7/pkgutil.py", line 578, in get_data
    loader = get_loader(package)
  File "/usr/lib/python2.7/pkgutil.py", line 464, in get_loader
    return find_loader(fullname)
  File "/usr/lib/python2.7/pkgutil.py", line 474, in find_loader
    for importer in iter_importers(fullname):
  File "/usr/lib/python2.7/pkgutil.py", line 430, in iter_importers
    __import__(pkg)
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/__init__.py", line 13, in <module>
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/utils/__init__.py", line 26, in <module>
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 3130, in <module>
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 3116, in _call_aside
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 3155, in _initialize_master_working_set
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 956, in subscribe
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 3155, in <lambda>
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 2655, in activate
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 2225, in declare_namespace
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 2194, in _handle_ns
  File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 2192, in sort_key
ValueError: '/usr/local/lib/python2.7/dist-packages' is not in list

> python -m virtualenv .venv3
New python executable in /home/sdague/code/openstack/.venv3/bin/python
Installing setuptools, pip, wheel...done.

So it appears that it's related to passing the --python parameter to virtualenv

dstufft commented 8 years ago

I suspect this is something caused by the sys.path munging not playing well with pkgutil.get_data.

Ivoz commented 8 years ago

Wait, is this then relying on virtualenv.py knowing a pip is installed exactly somewhere? Because that's essentially giving it a runtime dependency on pip for one thing, and for another obviously calling it with --python could be running it in a python without pip. One alternative is to always retrieve it from the pip wheel in virtualenv_support?

Slightly confusing that pkgutil just errors instead of

If the package cannot be located or loaded, or it uses a PEP 302 loader which does not support get_data(), then None is returned.

stmcginnis commented 8 years ago

I'm hitting this as well. Got around it with:

sudo pip uninstall virtualenv sudo pip install virtualenv==14.0.5

dstufft commented 8 years ago

Can you check https://github.com/pypa/virtualenv/pull/877 to see if that fixes this?

JordanP commented 8 years ago

I got the same issue here with Ubuntu 15.10 and virtualenv==14.0.5 and virtualenv==14.0.6 (I tried both, both failed). Upgrading to virtualenv==15.0.1 fixed it for me. When it failed, I did see some errors related to SSL certs, as mentionned in #877 so this was probably the correct fix.

Ivoz commented 8 years ago

Closing, please do tell if you still encounter the same problem @sdague

vijeth-aradhya commented 8 years ago
ERROR: invocation failed (exit code 1), logfile: /home/vijeth/IIIT/Sem3/SSAD/Assignments/Assignment 3/testing_learn/.tox/py27/log/py27-0.log
ERROR: actionid: py27
msg: getenv
cmdargs: ['/usr/bin/python3', '-m', 'virtualenv', '--python', '/usr/bin/python2.7', 'py27']
env: {'PYTHONHASHSEED': '190878495', 'HOME': '/home/vijeth', 'XDG_GREETER_DATA_DIR': '/var/lib/lightdm-data/vijeth', 'CLUTTER_IM_MODULE': 'xim', 'XDG_VTNR': '7', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'RBENV_SHELL': 'bash', 'WINDOWID': '60817418', 'QT4_IM_MODULE': 'xim', 'DESKTOP_SESSION': 'ubuntu', 'QT_LINUX_ACCESSIBILITY_ALWAYS_ON': '1', 'SSH_AUTH_SOCK': '/run/user/1000/keyring/ssh', 'JOB': 'unity-settings-daemon', 'DEFAULTS_PATH': '/usr/share/gconf/ubuntu.default.path', 'XDG_SESSION_ID': 'c2', 'UPSTART_SESSION': 'unix:abstract=/com/ubuntu/upstart-session/1000/2148', 'GNOME_KEYRING_PID': '', 'PATH': '/home/vijeth/IIIT/Sem3/SSAD/Assignments/Assignment 3/testing_learn/.tox/py27/bin:/home/vijeth/.rbenv/plugins/ruby-build/bin:/home/vijeth/.rbenv/shims:/home/vijeth/.rbenv/bin:/home/vijeth/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/vijeth/android-sdk-linux/tools:/home/vijeth/android-sdk-linux/platform-tools:/home/vijeth/bin', 'USER': 'vijeth', 'QT_ACCESSIBILITY': '1', 'LOGNAME': 'vijeth', 'GTK_MODULES': 'gail:atk-bridge:unity-gtk-module', 'VIRTUAL_ENV': '/home/vijeth/IIIT/Sem3/SSAD/Assignments/Assignment 3/testing_learn/.tox/py27', 'XDG_DATA_DIRS': '/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop', 'GTK2_MODULES': 'overlay-scrollbar', 'QT_QPA_PLATFORMTHEME': 'appmenu-qt5', 'DISPLAY': ':0', 'GTK_IM_MODULE': 'ibus', 'XDG_CURRENT_DESKTOP': 'Unity', 'INSTANCE': '', 'GPG_AGENT_INFO': '/home/vijeth/.gnupg/S.gpg-agent:0:1', 'UPSTART_INSTANCE': '', 'MANDATORY_PATH': '/usr/share/gconf/ubuntu.mandatory.path', 'SESSIONTYPE': 'gnome-session', 'GNOME_DESKTOP_SESSION_ID': 'this-is-deprecated', 'XDG_SESSION_DESKTOP': 'ubuntu', 'SHLVL': '1', 'GNOME_KEYRING_CONTROL': '', 'XDG_CONFIG_DIRS': '/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg', 'LANG': 'en_IN', 'J2REDIR': '/usr/lib/jvm/java-8-oracle/jre', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'COMPIZ_CONFIG_PROFILE': 'ubuntu', 'VTE_VERSION': '4205', 'OLDPWD': '/home/vijeth/IIIT/Sem3/SSAD/Assignments/Assignment 3', 'SESSION_MANAGER': 'local/Ganita:@/tmp/.ICE-unix/2378,unix/Ganita:/tmp/.ICE-unix/2378', 'GDM_LANG': 'en_US', 'TERM': 'xterm-256color', 'IM_CONFIG_PHASE': '1', 'XDG_SESSION_PATH': '/org/freedesktop/DisplayManager/Session0', 'JAVA_HOME': '/usr/lib/jvm/java-8-oracle', 'XAUTHORITY': '/home/vijeth/.Xauthority', 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:_.tar=01;31:_.tgz=01;31:_.arc=01;31:_.arj=01;31:_.taz=01;31:_.lha=01;31:_.lz4=01;31:_.lzh=01;31:_.lzma=01;31:_.tlz=01;31:_.txz=01;31:_.tzo=01;31:_.t7z=01;31:_.zip=01;31:_.z=01;31:_.Z=01;31:_.dz=01;31:_.gz=01;31:_.lrz=01;31:_.lz=01;31:_.lzo=01;31:_.xz=01;31:_.bz2=01;31:_.bz=01;31:_.tbz=01;31:_.tbz2=01;31:_.tz=01;31:_.deb=01;31:_.rpm=01;31:_.jar=01;31:_.war=01;31:_.ear=01;31:_.sar=01;31:_.rar=01;31:_.alz=01;31:_.ace=01;31:_.zoo=01;31:_.cpio=01;31:_.7z=01;31:_.rz=01;31:_.cab=01;31:_.jpg=01;35:_.jpeg=01;35:_.gif=01;35:_.bmp=01;35:_.pbm=01;35:_.pgm=01;35:_.ppm=01;35:_.tga=01;35:_.xbm=01;35:_.xpm=01;35:_.tif=01;35:_.tiff=01;35:_.png=01;35:_.svg=01;35:_.svgz=01;35:_.mng=01;35:_.pcx=01;35:_.mov=01;35:_.mpg=01;35:_.mpeg=01;35:_.m2v=01;35:_.mkv=01;35:_.webm=01;35:_.ogm=01;35:_.mp4=01;35:_.m4v=01;35:_.mp4v=01;35:_.vob=01;35:_.qt=01;35:_.nuv=01;35:_.wmv=01;35:_.asf=01;35:_.rm=01;35:_.rmvb=01;35:_.flc=01;35:_.avi=01;35:_.fli=01;35:_.flv=01;35:_.gl=01;35:_.dl=01;35:_.xcf=01;35:_.xwd=01;35:_.yuv=01;35:_.cgm=01;35:_.emf=01;35:_.ogv=01;35:_.ogx=01;35:_.aac=00;36:_.au=00;36:_.flac=00;36:_.m4a=00;36:_.mid=00;36:_.midi=00;36:_.mka=00;36:_.mp3=00;36:_.mpc=00;36:_.ogg=00;36:_.ra=00;36:_.wav=00;36:_.oga=00;36:_.opus=00;36:_.spx=00;36:_.xspf=00;36:', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-SAqhAv3YuD', 'UPSTART_EVENTS': 'xsession started', 'XMODIFIERS': '@im=ibus', 'GDMSESSION': 'ubuntu', 'J2SDKDIR': '/usr/lib/jvm/java-8-oracle', 'XDG_MENU_PREFIX': 'gnome-', 'UPSTART_JOB': 'unity7', 'XDG_SEAT': 'seat0', '_': '/usr/bin/tox', 'PWD': '/home/vijeth/IIIT/Sem3/SSAD/Assignments/Assignment 3/testing_learn', 'SHELL': '/bin/bash', 'XDG_SESSION_TYPE': 'x11', 'LANGUAGE': 'en_IN:en', 'SESSION': 'ubuntu', 'XDG_RUNTIME_DIR': '/run/user/1000', 'COMPIZ_BIN_PATH': '/usr/bin/', 'QT_IM_MODULE': 'ibus', 'DERBY_HOME': '/usr/lib/jvm/java-8-oracle/db', 'XDG_SEAT_PATH': '/org/freedesktop/DisplayManager/Seat0'}

New python executable in /home/vijeth/IIIT/Sem3/SSAD/Assignments/Assignment 3/testing_learn/.tox/py27/bin/python2.7
Also creating executable in /home/vijeth/IIIT/Sem3/SSAD/Assignments/Assignment 3/testing_learn/.tox/py27/bin/python
Installing setuptools, pkg_resources, pip, wheel...
  Complete output from command /home/vijeth/IIIT/Se...x/py27/bin/python2.7 - setuptools pkg_resources pip wheel:
  Collecting setuptools
Exception:
Traceback (most recent call last):
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/commands/install.py", line 328, in run
    wb.build(autobuilding=True)
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/wheel.py", line 748, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/req/req_set.py", line 360, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/req/req_set.py", line 512, in _prepare_file
    finder, self.upgrade, require_hashes)
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/req/req_install.py", line 273, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/index.py", line 442, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/index.py", line 400, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/index.py", line 545, in _get_pages
    page = self._get_page(location)
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/index.py", line 648, in _get_page
    return HTMLPage.get_page(link, session=self.session)
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/index.py", line 757, in get_page
    "Cache-Control": "max-age=600",
  File "/home/vijeth/IIIT/Sem3/SSAD/Assignments/Assignment 3/testing_learn/.tox/py27/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 480, in get
    return self.request('GET', url, *_kwargs)
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/download.py", line 378, in request
    return super(PipSession, self).request(method, url, *args, *_kwargs)
  File "/home/vijeth/IIIT/Sem3/SSAD/Assignments/Assignment 3/testing_learn/.tox/py27/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 468, in request
    resp = self.send(prep, *_send_kwargs)
  File "/home/vijeth/IIIT/Sem3/SSAD/Assignments/Assignment 3/testing_learn/.tox/py27/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 576, in send
    r = adapter.send(request, *_kwargs)
  File "/home/vijeth/IIIT/Sem3/SSAD/Assignments/Assignment 3/testing_learn/.tox/py27/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/adapter.py", line 46, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "/home/vijeth/IIIT/Sem3/SSAD/Assignments/Assignment 3/testing_learn/.tox/py27/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/adapters.py", line 376, in send
    timeout=timeout
  File "/home/vijeth/IIIT/Sem3/SSAD/Assignments/Assignment 3/testing_learn/.tox/py27/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 610, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/home/vijeth/IIIT/Sem3/SSAD/Assignments/Assignment 3/testing_learn/.tox/py27/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 228, in increment
    total -= 1

## TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'

...Installing setuptools, pkg_resources, pip, wheel...done.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 2363, in <module>
    main()
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 719, in main
    symlink=options.symlink)
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 988, in create_environment
    download=download,
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 918, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 812, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /home/vijeth/IIIT/Se...x/py27/bin/python2.7 - setuptools pkg_resources pip wheel failed with error code 2
Running virtualenv with interpreter /usr/bin/python2.7

ERROR: InvocationError: /usr/bin/python3 -m virtualenv --python /usr/bin/python2.7 py27 (see /home/vijeth/IIIT/Sem3/SSAD/Assignments/Assignment 3/testing_learn/.tox/py27/log/py27-0.log)
___________________________________________________________________ summary ____________________________________________________________________
ERROR:   py27: InvocationError: /usr/bin/python3 -m virtualenv --python /usr/bin/python2.7 py27 (see /home/vijeth/IIIT/Sem3/SSAD/Assignments/Assignment 3/testing_learn/.tox/py27/log/py27-0.log)

I'm getting this error for Ubuntu 16.04, is there any fix for this?

virtualenv --version 15.0.1 tox --version 2.3.1 pytest --version 3.0.3 pip --version 8.1.1

willzgli commented 7 years ago

Hello, I encountered the same question with you ,and the versions of softwares are as same as you listed . Is there a solution?