[root@mhc tmp]# pipenv –python 3.6
Creating a virtualenv for this project…
Using /root/python3/bin/python3.6m (3.6.4) to create virtualenv…
⠋Running virtualenv with interpreter /root/python3/bin/python3.6m
Traceback (most recent call last):
File “/usr/lib/python2.7/site-packages/virtualenv.py”, line 8, in <module>
import base64
File “/root/python3/lib/python3.6/base64.py”, line 9, in <module>
import re
File “/root/python3/lib/python3.6/re.py”, line 125, in <module>
import functools
File “/root/python3/lib/python3.6/functools.py”, line 21, in <module>
from collections import namedtuple
File “/root/python3/lib/python3.6/collections/__init__.py”, line 32, in <module>
from reprlib import recursive_repr as _recursive_repr
File “/usr/lib/python2.7/site-packages/reprlib/__init__.py”, line 7, in <module>
raise ImportError(‘This package should not be accessible on Python 3. ‘
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.
Error while trying to remove the /root/.local/share/virtualenvs/tmp-XVr6zr33 env:
No such file or directory
Virtualenv location:
Traceback (most recent call last):
File “/usr/bin/pipenv”, line 11, in <module>
load_entry_point(‘pipenv==2018.5.18’, ‘console_scripts’, ‘pipenv’)()
File “/usr/lib/python2.7/site-packages/pipenv/vendor/click/core.py”, line 722, in __call__
return self.main(*args, **kwargs)
File “/usr/lib/python2.7/site-packages/pipenv/vendor/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/lib/python2.7/site-packages/pipenv/vendor/click/core.py”, line 1043, in invoke
return Command.invoke(self, ctx)
File “/usr/lib/python2.7/site-packages/pipenv/vendor/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib/python2.7/site-packages/pipenv/vendor/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/usr/lib/python2.7/site-packages/pipenv/vendor/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/usr/lib/python2.7/site-packages/pipenv/cli.py”, line 270, in cli
three=three, python=python, warn=True, site_packages=site_packages
File “/usr/lib/python2.7/site-packages/pipenv/core.py”, line 650, in ensure_project
ensure_pipfile(validate=validate, skip_requirements=skip_requirements, system=system)
File “/usr/lib/python2.7/site-packages/pipenv/core.py”, line 260, in ensure_pipfile
python = which(‘python’) if not (USING_DEFAULT_PYTHON or system) else None
File “/usr/lib/python2.7/site-packages/pipenv/core.py”, line 128, in which
p = os.sep.join([location] + [‘bin/{0}’.format(command)])
TypeError: sequence item 0: expected string, NoneType found
===================================
pip install virtualenv --upgrade