errors while running pipenv on ubuntu - python

I want to run pipenv install on my ubuntu machine with python3.10 but I get those errors when running the command:
Installing dependencies from Pipfile.lock (17eb3b)...
Traceback (most recent call last):▉▉▉▉▉ 0/25 — 00:00:00
File "/root/.local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/root/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/root/.local/lib/python3.6/site-packages/pipenv/cli/options.py", line 56, in main
return super().main(*args, **kwargs, windows_expand_args=False)
File "/root/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/root/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/root/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/root/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/root/.local/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/root/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/root/.local/lib/python3.6/site-packages/pipenv/cli/command.py", line 241, in install
site_packages=state.site_packages,
File "/root/.local/lib/python3.6/site-packages/pipenv/core.py", line 2102, in do_install
keep_outdated=keep_outdated,
File "/root/.local/lib/python3.6/site-packages/pipenv/core.py", line 1343, in do_init
pypi_mirror=pypi_mirror,
File "/root/.local/lib/python3.6/site-packages/pipenv/core.py", line 870, in do_install_dependencies
project, normal_deps, procs, failed_deps_queue, requirements_dir, **install_kwargs
File "/root/.local/lib/python3.6/site-packages/pipenv/core.py", line 782, in batch_install
use_pep517=use_pep517,
File "/root/.local/lib/python3.6/site-packages/pipenv/core.py", line 1519, in pip_install
include_hashes=not ignore_hashes,
File "/root/.local/lib/python3.6/site-packages/pipenv/core.py", line 1438, in write_requirement_to_file
line = requirement.line_instance.get_line(
File "/root/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 2553, in line_instance
self.line_instance = self.get_line_instance()
File "/root/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 2547, in get_line_instance
return Line(line)
File "/root/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 171, in __init__
self.parse()
File "/root/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 1289, in parse
self.parse_extras()
File "/root/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 577, in parse_extras
self.line, extras = pip_shims.shims._strip_extras(self.line)
TypeError: 'NoneType' object is not callable
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/25 —
For more information, I did run pipenv --python /usr/bin/python3.10 before that because the projects is running and build on python3.10.
Any Idea how I can fix this error?

Somebody got the same error. It looks like problem happen with pip18.1 .
So at first with run:
pipenv run pip --version
you can see your pip version and then if pipenv locking 18.1 of pip run one of the below commands:
pipenv run python -m pip install -U pip==18.0
or
pipenv run pip install pip==18.0
and after that you can probably run pipenv install successfully.
You can see more discussions for this issue in [Running pipenv gives TypeError: 'module' object is not callable].

Related

FileNotFoundError: [Errno 2] using Pipenv

I'm trying to install dependencies in django using pipenv install.
Then it responded error message like this in Ubuntu 22.04 LTS. Does file path in wrong or installation incomplete?
Python version - 3.10.4, pip version - pip 22.0.4 from /usr/local/lib/python3.10/dist-packages/pip (python 3.10)
/home/username/.local/lib/python3.10/site-packages/pkg_resources/__init__.py:123: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
warnings.warn(
/home/username/.local/lib/python3.10/site-packages/pkg_resources/__init__.py:123: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
Creating a virtualenv for this project...
Pipfile: /home/username/Documents/codes/storefront2/Pipfile
Using /usr/bin/python3 (3.10.4) to create virtualenv...
⠏ Creating virtual environment...created virtual environment CPython3.10.4.final.0-64 in 184ms
creator CPython3Posix(dest=/home/username/.local/share/virtualenvs/storefront2-Kl67gUFU, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/username/.local/share/virtualenv)
added seed packages: pip==22.0.4, setuptools==62.1.0, wheel==0.37.1
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
✔ Successfully created virtual environment!
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pipenv/cli/options.py", line 56, in main
return super().main(*args, **kwargs, windows_expand_args=False)
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pipenv/cli/command.py", line 222, in install
do_install(
File "/usr/local/lib/python3.10/dist-packages/pipenv/core.py", line 1964, in do_install
ensure_project(
File "/usr/local/lib/python3.10/dist-packages/pipenv/core.py", line 552, in ensure_project
ensure_virtualenv(
File "/usr/local/lib/python3.10/dist-packages/pipenv/core.py", line 485, in ensure_virtualenv
do_create_virtualenv(
File "/usr/local/lib/python3.10/dist-packages/pipenv/core.py", line 1012, in do_create_virtualenv
project._environment = Environment(
File "/usr/local/lib/python3.10/dist-packages/pipenv/environment.py", line 70, in __init__
self._base_paths = self.get_paths()
File "/usr/local/lib/python3.10/dist-packages/pipenv/environment.py", line 394, in get_paths
c = subprocess_run(command)
File "/usr/local/lib/python3.10/dist-packages/pipenv/utils/processes.py", line 75, in subprocess_run
return subprocess.run(
File "/usr/lib/python3.10/subprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.10/subprocess.py", line 966, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1842, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.local/share/virtualenvs/storefront2-Kl67gUFU/bin/python'
pip uninstall -y setuptools
corrected above for me. See FileNotFoundError: [Errno 2] when installing pipenv from pipfile for additional details

Pipenv error when trying to uninstall dependencies

I am quite new to Python and I am trying to setup a project with pipenv. It seemed to work well, but when I tried to uninstall dependencies, I got the following error:
# pipenv uninstall flask
Uninstalling flask...
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pipenv/cli/command.py", line 247, in uninstall
retcode = do_uninstall(
File "/usr/local/lib/python3.10/dist-packages/pipenv/core.py", line 2258, in do_uninstall
with project.environment.activated():
File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.10/dist-packages/pipenv/environment.py", line 894, in activated
if extra_dist not in self.get_working_set():
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 629, in __contains__
return self.by_key.get(dist.key) == dist
AttributeError: 'NoneType' object has no attribute 'key'
I uninstalled and installed pipenv, but the issue persists. I am using WSL2.
I also tried uninstalling all dependencies. It have worked, but they did not disappear from the Pipfile - I am not sure if it is a separate issue, but thought it's worth mentioning.
Could someone advise? Also let me know if I missed something.
Thanks!
Try to remove the virtualenv, that pipenv creates, and after that run again pipenv install, don't forgot to remove flask from pipfile and pipfile.lock
You can try too to execute WSL with admin privileges before.

Installing django with python error on widows 10?

I seem to get errors when installing django with the following commands. I follow the instructions form the book i am using exactly but get errors. First installing pipenv gave me errors about path and updating the paths in windows manually fixed that.
pip3 install pipenv <---- executes correlty with no errors
pipenv install django ~=3.1.0 <----- get the following errors below
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts\pipenv.exe\__main__.py", line 7, in <module>
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\click\core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\click\core.py", line 1053, in main
rv = self.invoke(ctx)
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\click\core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\click\core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\click\core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\click\decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\click\core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\cli\command.py", line 194, in install
do_install(
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\core.py", line 2046, in do_install
pkg_requirement = Requirement.from_line(pkg_line)
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 2674, in from_line
parsed_line = Line(line)
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 171, in __init__
self.parse()
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 1304, in parse
self.parse_name()
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 1027, in parse_name
name = self._parse_name_from_line()
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 968, in _parse_name_from_line
raise RequirementError(
pipenv.vendor.requirementslib.exceptions.RequirementError: Failed parsing requirement from 'C:\\Users\\=3.1.0'
any help would be appreciated. I have disabled windows defender just encase it was a internet access isue even though the error does not report as such. I am running all commands through windwos power shell as administrator. I am using python 3.9
I cant seem to find anyone with similar problem online. Would appreciate some help
Thank you
https://virtualenvwrapper.readthedocs.io/en/latest/install.html
Make new env
Mkvirtualenv test
pip install django
Just encase anyone is interested in why I was encountering the above error, it was because of the space between django and ~ .
pipenv install django ~=3.1.0 <------ gave me errors
pipenv install django~=3.1.0 <----- everything was fine.

why am i getting this error when i am using pipenv to install scrapy?

I'm using pipenv to install scrapy on windows10 X64:
pipenv shell
pipenv install scrapy
then i get this error below:
(scrapy_demo-Nk7qjJjf) D:\PycharmProjects\scrapy_demo>pipenv install scrapy
Installing scrapy...
Traceback (most recent call last):
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\RussellXu\AppData\Local\Programs\Python\Python37\Scripts\pipenv.exe\__main__.py", line 9, in <module>
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\cli.py", line 435, in install
selective_upgrade=selective_upgrade,
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 1971, in do_install
pypi_mirror=pypi_mirror,
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 1375, in pip_install
package_name.split('--hash')[0].split('--trusted-host')[0]
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 704, in from_line
line, extras = _strip_extras(line)
TypeError: 'module' object is not callable
so why am i getting this error and how can i fix it ?
Make sure pipenv is upgraded to the latest version.
If upgrading didn't work, you can try this workaround as mentioned in: https://github.com/pypa/pipenv/issues/2924#issuecomment-427351356
pip install pipenv
pipenv run pip install pip==18.0
pipenv install

Cannot create python virtualenv

I'm working on a legacy app that needs python2.6.2.
I installed successfully python 2.6.2 and setuptools.
Now when I try to create a virtualenv using this version it gives me this error:
$ virtualenv --python=/usr/local/python2.6.2/bin/python mypythonnewapp
Running virtualenv with interpreter /usr/local/python2.6.2/bin/python
New python executable in /home/vagrant/mypythonnewapp/bin/python
Installing setuptools<37, pip, wheel<0.30...
Complete output from command /home/vagrant/mypythonnewapp/bin/python - setuptools<37 pip wheel<0.30:
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
Collecting setuptools<37
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/commands/install.py", line 324, in run
requirement_set.prepare_files(finder)
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/index.py", line 792, in get_page
"Cache-Control": "max-age=600",
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/_vendor/requests/sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/_vendor/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/_vendor/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/_vendor/cachecontrol/adapter.py", line 37, in send
cached_response = self.controller.cached_request(request)
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/_vendor/cachecontrol/controller.py", line 111, in cached_request
resp = self.serializer.loads(request, cache_data)
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/_vendor/cachecontrol/serialize.py", line 114, in loads
return getattr(self, "_loads_v{0}".format(ver))(request, data)
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/_vendor/cachecontrol/serialize.py", line 196, in _loads_v2
return self.prepare_response(request, cached)
File "/usr/lib/python2.6/site-packages/virtualenv_support/pip-9.0.3-py2.py3-none-any.whl/pip/_vendor/cachecontrol/serialize.py", line 157, in prepare_response
**cached["response"]
TypeError: __init__() keywords must be strings
----------------------------------------
...Installing setuptools<37, pip, wheel<0.30...done.
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 2349, in <module>
main()
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 712, in main
symlink=options.symlink)
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 953, in create_environment
download=download,
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 904, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 796, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/vagrant/mypythonnewapp/bin/python - setuptools<37 pip wheel<0.30 failed with error code 2
Any suggestions other than upgrading anything are welcome.
Thanks
This seems like a bug in virtualenv. See how virtualenv.py limits versions of setuptools and wheel for Python 2.6, but not for pip. It must limit pip to version '<10' for Py 2.6. Please report the bug or better send a pull request.
Meanwhile create a virtualenv with --no-pip and later install pip into the virtualenv manually.
Try using pyenv. At least it claims to support versions of Python back to 2.1.3

Categories