question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pipenv install fails when any [[source]] other than pypi is used

See original GitHub issue
Describe your environment
  1. OS Type MacOS 10.12.6, Ubuntu 16.04
  2. Python version: 3.6.4
  3. Pipenv version: 9.0.3
Expected result

‘pipenv install’ with a custom source should work.

Actual result

Traceback (most recent call last): File “/usr/local/bin/pipenv”, line 11, in <module> sys.exit(cli()) File “/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py”, line 722, in call return self.main(*args, **kwargs) File “/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py”, line 697, in main rv = self.invoke(ctx) File “/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py”, line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File “/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py”, line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File “/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py”, line 535, in invoke return callback(*args, **kwargs) File “/usr/local/lib/python3.6/site-packages/pipenv/cli.py”, line 1865, in install do_init(dev=dev, allow_global=system, ignore_pipfile=ignore_pipfile, system=system, skip_lock=skip_lock, verbose=verbose, concurrent=concurrent, deploy=deploy, pre=pre) File “/usr/local/lib/python3.6/site-packages/pipenv/cli.py”, line 1306, in do_init do_lock(system=system, pre=pre) File “/usr/local/lib/python3.6/site-packages/pipenv/cli.py”, line 1102, in do_lock pre=pre File “/usr/local/lib/python3.6/site-packages/pipenv/utils.py”, line 545, in resolve_deps resolved_tree = actually_resolve_reps(deps, index_lookup, markers_lookup, project, sources, verbose, clear, pre) File “/usr/local/lib/python3.6/site-packages/pipenv/utils.py”, line 507, in actually_resolve_reps resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS)) File “/usr/local/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py”, line 102, in resolve has_changed, best_matches = self._resolve_one_round() File “/usr/local/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py”, line 200, in _resolve_one_round for dep in self._iter_dependencies(best_match): File “/usr/local/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py”, line 296, in _iter_dependencies dependencies = self.repository.get_dependencies(ireq) File “/usr/local/lib/python3.6/site-packages/pipenv/patched/piptools/repositories/pypi.py”, line 153, in get_dependencies result = reqset._prepare_file(self.finder, ireq) File “/usr/local/lib/python3.6/site-packages/pipenv/patched/pip/req/req_set.py”, line 671, in _prepare_file check_dist_requires_python(dist) File “/usr/local/lib/python3.6/site-packages/pipenv/patched/pip/utils/packaging.py”, line 56, in check_dist_requires_python os.environ[‘PIP_PYTHON_VERSION’] pip.exceptions.UnsupportedPythonVersion: futures requires Python ‘>=2.6, ❤️’ but the running Python is 3.6.4

Steps to replicate

Create a pipfile that looks like the following -

[[source]]
url = "https://my.mirror.host/mirror/simple"
verify_ssl = true
name = "pypi-mirror"

[packages]
keras = "*"

[dev-packages]

[requires]
python_version = "3.6"

‘pipenv install’ fails with the above error - if you replace the source section with the default, it works perfectly. This is a duplicate of #1166, but that was closed by the submitter, but it is still present.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:20 (12 by maintainers)

github_iconTop GitHub Comments

3reactions
dprattcommented, Feb 17, 2018

I don’t really understand how it could be.

If I leave the URL as the default in my Pipfile, everything works perfectly, but changing it to anything but the default causes the above problem.

I have replicated this on my local MacOS environment as well as several different EC2 instances. If it’s an installation issue, what is installed incorrectly?

On Feb 17, 2018, at 7:26 AM, Kenneth Reitz notifications@github.com wrote:

this looks like an installation issue, not a pipenv/pypi issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

0reactions
kalfacommented, Mar 15, 2018

anyway, patching only pipenv wouldn’t resovle the problem, unless we can issue a ‘pip install’ telling pip to ignore the metadata as well.

Otherwise it will simply postpone the rejection when pip is actually executed. Am I getting something wrong?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently Encountered Pipenv Problems - Read the Docs
This is usually a result of mixing Pipenv with system packages. We strongly recommend installing Pipenv in an isolated environment. Uninstall all existing ......
Read more >
How to resolve Python package dependencies with pipenv?
First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again. Alternatively, you can use $ pipenv...
Read more >
Advanced Usage of Pipenv - Python Packaging Authority
Pipenv allows you to open any Python module that is installed (including ones in your codebase), with the $ pipenv open command: $...
Read more >
opencv-python - PyPI
These packages are smaller than the two other packages above because they do ... Q: Pip install fails with ModuleNotFoundError: No module named...
Read more >
Using Python's pip to Manage Your Projects' Dependencies
In this beginner-friendly tutorial, you'll learn how to use pip, ... Here, you're installing rptree from TestPyPI rather than from PyPI.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found