Skip to content

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

@halicki

Description

@halicki

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions