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

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.

About this issue

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

Most upvoted comments

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.