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 is unable to find asdf installed python when run from fish #3242

Closed
halicki opened this issue Nov 16, 2018 · 4 comments
Closed

pipenv is unable to find asdf installed python when run from fish #3242

halicki opened this issue Nov 16, 2018 · 4 comments

Comments

@halicki
Copy link

halicki commented Nov 16, 2018

Issue description

On ubuntu 18.04 pipenv install run from fish is unable to find specific python version installed with asdf.

In my oppinion it's reason is that module pipenv.vendor.pythonfinder.environment depends on presence of environment variable called ASDF_DATA_DIR while file asdf.fish (which importing is suggested by the asdf README.md) that does not exports it.

Expected result

Pipenv finds successfully specific python version from asdf.

Actual result

Pipenv don't find python installation although asdf is present in system.

$ pipenv install
Warning: Python 3.7 was not found on your system…
You can specify specific versions of Python with:
  $ pipenv --python path/to/python

Steps to replicate

  1. Install & run fish.

    sudo apt-get install fish
    fish
  2. Install asdf.
    Follow instructions from asdf README.md

    git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.6.1
    echo 'source ~/.asdf/asdf.fish' >> ~/.config/fish/config.fish
    mkdir -p ~/.config/fish/completions; and cp ~/.asdf/completions/asdf.fish ~/.config/fish/completions
    exec asdf
  3. Create a basic Pipfile:

    [[source]]
    url = "https://pypi.org/simple"
    name = "pypi"
    verify_ssl = true
    
    [packages]
    requests = "*"
    
    [dev-packages]
    
    [requires]
    python_version = "3.7"
  4. Run pipenv:

    pipenv install

$ pipenv --support

Pipenv version: '2018.11.14'

Pipenv location: '/home/arkadiusz/.local/lib/python3.7/site-packages/pipenv'

Python location: '/home/arkadiusz/.pyenv/versions/3.7.0/bin/python'

Python installations found:

  • 3.6.6: /usr/bin/python3.6
  • 3.6.6: /usr/bin/python3.6m
  • 3.5.3: /usr/bin/python3.5m
  • 3.5.3: /usr/bin/python3.5
  • 2.7.15rc1: /usr/bin/python2.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.7.0',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.15.0-38-generic',
 'platform_system': 'Linux',
 'platform_version': '#41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018',
 'python_full_version': '3.7.0',
 'python_version': '3.7',
 'sys_platform': 'linux'}

System environment variables:

  • APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL
  • CHROME_DESKTOP
  • CLUTTER_IM_MODULE
  • DBUS_SESSION_BUS_ADDRESS
  • DEFAULTS_PATH
  • DESKTOP_SESSION
  • DESKTOP_STARTUP_ID
  • DISPLAY
  • GDMSESSION
  • GIO_LAUNCHED_DESKTOP_FILE
  • GIO_LAUNCHED_DESKTOP_FILE_PID
  • GJS_DEBUG_OUTPUT
  • GJS_DEBUG_TOPICS
  • GNOME_DESKTOP_SESSION_ID
  • GNOME_SHELL_SESSION_MODE
  • GPG_AGENT_INFO
  • GTK2_MODULES
  • GTK_IM_MODULE
  • GTK_MODULES
  • HOME
  • IM_CONFIG_PHASE
  • LANG
  • LANGUAGE
  • LC_ADDRESS
  • LC_IDENTIFICATION
  • LC_MEASUREMENT
  • LC_MONETARY
  • LC_NAME
  • LC_NUMERIC
  • LC_PAPER
  • LC_TELEPHONE
  • LC_TIME
  • LOGNAME
  • LS_COLORS
  • MANDATORY_PATH
  • OMF_CONFIG
  • OMF_PATH
  • PATH
  • PIPENV_SHELL_FANCY
  • PWD
  • QT4_IM_MODULE
  • QT_ACCESSIBILITY
  • QT_IM_MODULE
  • SESSION_MANAGER
  • SHELL
  • SHLVL
  • SSH_AGENT_PID
  • SSH_AUTH_SOCK
  • S_COLORS
  • TERM
  • TERM_PROGRAM
  • TERM_PROGRAM_VERSION
  • TEXTDOMAIN
  • TEXTDOMAINDIR
  • USER
  • USERNAME
  • WINDOWPATH
  • XAUTHORITY
  • XDG_CONFIG_DIRS
  • XDG_CURRENT_DESKTOP
  • XDG_DATA_DIRS
  • XDG_MENU_PREFIX
  • XDG_RUNTIME_DIR
  • XDG_SEAT
  • XDG_SESSION_DESKTOP
  • XDG_SESSION_ID
  • XDG_SESSION_TYPE
  • XDG_VTNR
  • XMODIFIERS
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

  • PIPENV_SHELL_FANCY: True

Debug–specific environment variables:

  • PATH: /home/arkadiusz/.asdf/shims:/home/arkadiusz/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/arkadiusz/.local/bin:/home/arkadiusz/.local/bin:/home/arkadiusz/.local/bin
  • SHELL: /usr/bin/fish
  • LANG: en_US.UTF-8
  • PWD: /home/arkadiusz/Projects/awsd_error

Contents of Pipfile ('/home/arkadiusz/Projects/awsd_error/Pipfile'):

[[source]]
url = "https://pypi.org/simple"
name = "pypi"
verify_ssl = true


[packages]
requests = "*"


[dev-packages]


[requires]
python_version = "3.7"
@duplicate-issues
Copy link

Hey @halicki,

We did a quick check and this issue looks very darn similar to

This could be a coincidence, but if any of these issues solves your problem then I did a good job 😄

If not, the maintainers will get to this issue shortly.

Cheers,
Your Friendly Neighborhood ProBot

@techalchemy
Copy link
Member

Support for this has been added upstream in in pythonfinder in sarugaku/pythonfinder#36 and will be added to pipenv in the next release (tomorrow)

techalchemy added a commit that referenced this issue Nov 19, 2018
- Fixes #3242
- Fixes #3232
- Fixes #3229
- Fixes #3234

Signed-off-by: Dan Ryan <dan@danryan.co>
@halicki
Copy link
Author

halicki commented Nov 19, 2018

That's awesome! Thanks. 🍾

@halicki halicki closed this as completed Nov 19, 2018
@wooly
Copy link

wooly commented Nov 21, 2018

Hey @techalchemy, do you know when the next release with this fix might get pushed to PyPI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants