I got the same error also on vend so is not a problem where to use but a problem of python:
mte90:/tmp $ virtualenv foo
Running virtualenv with interpreter /usr/local/bin/python2
Using real prefix '/usr'
New python executable in /tmp/foo/bin/python2
Also creating executable in /tmp/foo/bin/python
Installing setuptools, pkg_resources, pip, wheel...
Complete output from command /tmp/foo/bin/python2 - setuptools pkg_resources pip wheel:
Traceback (most recent call last):
File "<stdin>", line 7, in <module>
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 21, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 64, in <module>
vendored("cachecontrol")
File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
__import__(modulename, globals(), locals(), level=0)
File "/tmp/foo/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/__init__.py", line 9, in <module>
File "/tmp/foo/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/wrapper.py", line 1, in <module>
File "/tmp/foo/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 4, in <module>
File "/tmp/foo/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/__init__.py", line 52, in <module>
File "/tmp/foo/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/packages/__init__.py", line 53, in <module>
File "/tmp/foo/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/packages/__init__.py", line 35, in vendored
File "/tmp/foo/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/__init__.py", line 8, in <module>
File "/tmp/foo/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 11, in <module>
File "/tmp/foo/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/exceptions.py", line 2, in <module>
File "/tmp/foo/share/python-wheels/six-1.10.0-py2.py3-none-any.whl/six.py", line 203, in load_module
mod = mod._resolve()
File "/tmp/foo/share/python-wheels/six-1.10.0-py2.py3-none-any.whl/six.py", line 115, in _resolve
return _import_module(self.mod)
File "/tmp/foo/share/python-wheels/six-1.10.0-py2.py3-none-any.whl/six.py", line 82, in _import_module
__import__(name)
File "/usr/lib/python2.7/httplib.py", line 1230, in <module>
import ssl
File "/usr/lib/python2.7/ssl.py", line 133, in <module>
PROTOCOL_SSLv23 = PROTOCOL_TLS
NameError: name 'PROTOCOL_TLS' is not defined
----------------------------------------
...Installing setuptools, pkg_resources, pip, wheel...done.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 2375, in <module>
main()
File "/usr/lib/python3/dist-packages/virtualenv.py", line 724, in main
symlink=options.symlink)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 992, in create_environment
download=download,
File "/usr/lib/python3/dist-packages/virtualenv.py", line 922, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 817, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /tmp/foo/bin/python2 - setuptools pkg_resources pip wheel failed with error code 1