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 run no longer sets $VIRTUAL_ENV #4838

Closed
mrphlip opened this issue Nov 8, 2021 · 3 comments · Fixed by #4839
Closed

pipenv run no longer sets $VIRTUAL_ENV #4838

mrphlip opened this issue Nov 8, 2021 · 3 comments · Fixed by #4839

Comments

@mrphlip
Copy link

mrphlip commented Nov 8, 2021

Issue description

After updating to the latest version of pipenv, commands run with pipenv run no longer have VIRTUAL_ENV set in the environment

Expected result

VIRTUAL_ENV is set in the environment of the subprocess to point to the virtual environment path

Actual result

$ pipenv --version
pipenv, version 2021.5.29
$ pipenv run bash -c 'echo $VIRTUAL_ENV'
/home/phlip/.local/share/virtualenvs/test-hxkKlP5o
$ pip install --user --upgrade pipenv
[etc etc installing progress]
$ pipenv --version
pipenv, version 2021.11.5.post0
$ pipenv run bash -c 'echo $VIRTUAL_ENV'

I believe this is due to this change replacing the call to inline_activate_virtual_environment, which is where VIRTUAL_ENV is set.

$ pipenv --support

Pipenv version: '2021.11.5.post0'

Pipenv location: '/home/phlip/.local/lib/python3.8/site-packages/pipenv'

Python location: '/usr/bin/python3'

Python installations found:

  • 3.9.7: /usr/bin/python3.9
  • 3.8.10: /usr/bin/python3.8
  • 3.8.10: /usr/bin/python3
  • 3.7.12: /usr/bin/python3.7m
  • 3.7.12: /usr/bin/python3.7
  • 3.6.15: /usr/bin/python3.6m
  • 3.6.15: /usr/bin/python3.6
  • 2.7.18: /usr/bin/python2
  • 2.7.18: /usr/bin/python
  • 2.7.18: /usr/bin/python2.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.8.10',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '5.4.0-89-generic',
 'platform_system': 'Linux',
 'platform_version': '#100-Ubuntu SMP Fri Sep 24 14:50:10 UTC 2021',
 'python_full_version': '3.8.10',
 'python_version': '3.8',
 'sys_platform': 'linux'}

System environment variables:

  • SHELL
  • DERBY_HOME
  • LANGUAGE
  • DEVKITPRO
  • TERMCAP
  • JAVA_HOME
  • WINDOW
  • EDITOR
  • PWD
  • LOGNAME
  • XDG_SESSION_TYPE
  • J2REDIR
  • MOTD_SHOWN
  • HOME
  • LANG
  • LS_COLORS
  • PERL5LIB
  • SSH_CONNECTION
  • DEVKITARM
  • LESSCLOSE
  • XDG_SESSION_CLASS
  • TERM
  • PERL_MB_OPT
  • J2SDKDIR
  • LESSOPEN
  • USER
  • PERL_MM_OPT
  • DISPLAY
  • SHLVL
  • XDG_SESSION_ID
  • XDG_RUNTIME_DIR
  • SSH_CLIENT
  • XDG_DATA_DIRS
  • PERL_LOCAL_LIB_ROOT
  • PATH
  • STY
  • DBUS_SESSION_BUS_ADDRESS
  • SSH_TTY
  • OLDPWD
  • _
  • PIP_SHIMS_BASE_MODULE
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /home/phlip/perl5/bin:/home/phlip/bin:/home/phlip/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/sbin:/usr/sbin:/usr/lib/xscreensaver:/usr/local/devkitPro/devkitARM/bin
  • SHELL: /bin/bash
  • EDITOR: vim
  • LANG: en_AU.UTF-8
  • PWD: /tmp/test

Contents of Pipfile ('/tmp/test/Pipfile'):

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

[packages]

[dev-packages]

[requires]
python_version = "3.9"
@cpontvieux-systra
Copy link

You should yank the latest release on Pypi until this bugfix reach a release. The last version cause severe regressions.

@gitpushdashf
Copy link

This would be really useful for us to have in a release. Thanks for fixing it, @frostming !

@frostming
Copy link
Contributor

@cpontvieux-systra Sure, I have no permission to manage the release but I asked other guys to do it. Now they are yanked.

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

Successfully merging a pull request may close this issue.

4 participants