Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipenv --support errors when trying to detect installed python versions #3121

Closed
software-opal opened this issue Oct 29, 2018 · 3 comments
Closed
Assignees
Labels
Type: Bug 🐛 This issue is a bug. Type: Regression This issue is a regression of a previous behavior. Type: Vendored Dependencies This issue affects vendored dependencies within pipenv.

Comments

@software-opal
Copy link

software-opal commented Oct 29, 2018

Issue description

Whilst submitting #3113 I discovered that pipenv --support errors out whilst discovering python instalations.

My guess is that it's either related to pyenv; or something funky in my path.

Expected result

A listing of python versions that have been installed.

Actual result

Based on the comment on 3113 I tried against the latest update-vendor branch. (ignore the --prefix ... that's from another bug)

$ pip install --prefix=/home/opal/.local/ -e git+https://github.com/pypa/pipenv.git@update-vendor#egg=pipenv
Obtaining pipenv from git+https://github.com/pypa/pipenv.git@update-vendor#egg=pipenv
  Cloning https://github.com/pypa/pipenv.git (to revision update-vendor) to ./src/pipenv
Branch 'update-vendor' set up to track remote branch 'update-vendor' from 'origin'.
Switched to a new branch 'update-vendor'
  Installing build dependencies ... done
Requirement already satisfied: pip>=9.0.1 in /home/opal/.local/lib/python3.6/site-packages (from pipenv) (18.1)
Requirement already satisfied: certifi in /home/opal/.local/lib/python3.6/site-packages (from pipenv) (2018.10.15)
Requirement already satisfied: setuptools>=36.2.1 in /home/opal/.local/lib/python3.6/site-packages (from pipenv) (40.4.3)
Requirement already satisfied: virtualenv-clone>=0.2.5 in /home/opal/.local/lib/python3.6/site-packages (from pipenv) (0.4.0)
Requirement already satisfied: virtualenv in /home/opal/.local/lib/python3.6/site-packages (from pipenv) (16.0.0)
Installing collected packages: pipenv
  Found existing installation: pipenv 2018.10.14.dev0
    Uninstalling pipenv-2018.10.14.dev0:
      Successfully uninstalled pipenv-2018.10.14.dev0
  Running setup.py develop for pipenv
Successfully installed pipenv
$ ( cd ./src/pipenv; git rev-parse HEAD )
912d9c5e9c0f72a69ec2ad2e4b204f4f9495d71c
$ pipenv --support
(snip ... see below)

Pipenv version: '2018.10.14.dev0'

Pipenv location: '/home/opal/piwik3/piwik-release-build/src/pipenv/pipenv'

Python location: '/usr/bin/python3'

Python installations found:

Traceback (most recent call last):
  File "/home/opal/.local/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv', 'console_scripts', 'pipenv')()
  File "/home/opal/piwik3/piwik-release-build/src/pipenv/pipenv/vendor/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/opal/piwik3/piwik-release-build/src/pipenv/pipenv/vendor/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/opal/piwik3/piwik-release-build/src/pipenv/pipenv/vendor/click/core.py", line 1114, in invoke
    return Command.invoke(self, ctx)
  File "/home/opal/piwik3/piwik-release-build/src/pipenv/pipenv/vendor/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/opal/piwik3/piwik-release-build/src/pipenv/pipenv/vendor/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/opal/piwik3/piwik-release-build/src/pipenv/pipenv/vendor/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/home/opal/piwik3/piwik-release-build/src/pipenv/pipenv/vendor/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/opal/piwik3/piwik-release-build/src/pipenv/pipenv/vendor/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/opal/piwik3/piwik-release-build/src/pipenv/pipenv/cli/command.py", line 142, in cli
    get_pipenv_diagnostics()
  File "/home/opal/piwik3/piwik-release-build/src/pipenv/pipenv/help.py", line 33, in get_pipenv_diagnostics
    python_paths = finder.find_all_python_versions()
  File "/home/opal/piwik3/piwik-release-build/src/pipenv/pipenv/vendor/pythonfinder/pythonfinder.py", line 135, in find_all_python_versions
    major=major, minor=minor, patch=patch, pre=pre, dev=dev, arch=arch, name=name
  File "/home/opal/piwik3/piwik-release-build/src/pipenv/pipenv/vendor/pythonfinder/models/path.py", line 268, in find_all_python_versions
    values = list(self.get_pythons(sub_finder))
  File "/home/opal/piwik3/piwik-release-build/src/pipenv/pipenv/vendor/pythonfinder/models/path.py", line 219, in get_pythons
    reverse=True
  File "/home/opal/piwik3/piwik-release-build/src/pipenv/pipenv/vendor/pythonfinder/models/path.py", line 217, in <genexpr>
    (p for p in self._filter_paths(finder) if p.is_python),
AttributeError: 'list' object has no attribute 'is_python'
@techalchemy
Copy link
Member

Thank you so much for testing this. I finally got the rest of the broken things fixed after a full week of debugging, but I didn’t want to cut a release that is still broken!

@techalchemy
Copy link
Member

Would you mind pulling and trying again?

@techalchemy techalchemy self-assigned this Oct 29, 2018
@techalchemy techalchemy added Type: Bug 🐛 This issue is a bug. Type: Regression This issue is a regression of a previous behavior. Type: Vendored Dependencies This issue affects vendored dependencies within pipenv. labels Oct 29, 2018
@software-opal
Copy link
Author

software-opal commented Oct 30, 2018

The latest code(c0fdd8a) works exactly as intended:


Pipenv version: '2018.10.14.dev0'

Pipenv location: '/home/opal/temp/src/pipenv/pipenv'

Python location: '/usr/bin/python3'

Python installations found:

  • 3.6.5: /home/opal/.pyenv/shims/python3.6
  • 3.6.5: /home/opal/.pyenv/shims/python3.6m
  • 3.6.5: /home/opal/.pyenv/shims/python3
  • 3.6.5: /usr/bin/python3
  • 3.6.5: /usr/bin/python3.6m
  • 2.7.15: /home/opal/.pyenv/shims/python
  • 2.7.15: /usr/bin/python

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.5',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.18.15-1-default',
 'platform_system': 'Linux',
 'platform_version': '#1 SMP PREEMPT Thu Oct 18 08:56:17 UTC 2018 (5a53676)',
 'python_full_version': '3.6.5',
 'python_version': '3.6',
 'sys_platform': 'linux'}

(snip)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 This issue is a bug. Type: Regression This issue is a regression of a previous behavior. Type: Vendored Dependencies This issue affects vendored dependencies within pipenv.
Projects
None yet
Development

No branches or pull requests

2 participants