question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pipenv installs into python installation and not virtualenv

See original GitHub issue

Issue description

pipenv install installs packages like pytest into PYTHONHOME Location and not the virtualenv

Expected result

pytest is installed into virtualenv and pipenv run pytest works.

Actual result

Installing collected packages: pytest The scripts py.test.exe and pytest.exe are installed in 'D:\Python36\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed pytest-4.0.0.

pipenv run pytest results in command pytest not found

Steps to replicate

$ pipenv --support

Pipenv version: '2018.11.14'

Pipenv location: 'd:\\python36\\lib\\site-packages\\pipenv'

Python location: 'd:\\python36\\python.exe'

Python installations found:

  • 3.6.7: D:\Python36\python.exe
  • 3.6.6: D:\Python36-64\python.exe

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.7',
 'os_name': 'nt',
 'platform_machine': 'AMD64',
 'platform_python_implementation': 'CPython',
 'platform_release': '7',
 'platform_system': 'Windows',
 'platform_version': '6.1.7601',
 'python_full_version': '3.6.7',
 'python_version': '3.6',
 'sys_platform': 'win32'}

System environment variables:

  • ALLUSERSPROFILE
  • APPDATA
  • CGROAMINGPATH
  • CLIENTNAME
  • COMMONPROGRAMFILES
  • COMMONPROGRAMFILES(X86)
  • COMMONPROGRAMW6432
  • COMPUTERNAME
  • COMSPEC
  • DAS_HOME
  • DSPACE_RTT_TOOLS_2
  • FP_NO_HOST_CHECK
  • GOPATH
  • GOROOT
  • HOMEDRIVE
  • HOMEPATH
  • HTTPS_PROXY
  • LM_LICENSE_FILE
  • LOCALAPPDATA
  • LOGONSERVER
  • LSFORCEHOST
  • LSHOST
  • NUMBER_OF_PROCESSORS
  • OPENSSL_CONF
  • OS
  • PATH
  • PATHEXT
  • PLMVIS_82_LIBPATH
  • PROCESSOR_ARCHITECTURE
  • PROCESSOR_ARCHITEW6432
  • PROCESSOR_IDENTIFIER
  • PROCESSOR_LEVEL
  • PROCESSOR_REVISION
  • PROGRAMDATA
  • PROGRAMFILES
  • PROGRAMFILES(X86)
  • PROGRAMW6432
  • PROMPT
  • PSMODULEPATH
  • PUBLIC
  • RTARCH
  • RTHOME
  • SECSPECIALMODE
  • SESSIONNAME
  • SILVER_HOME
  • SIL_USER_TYPE
  • SYSTEMDRIVE
  • SYSTEMROOT
  • TEMP
  • TERM
  • TMP
  • TSK_OPTIONS_FILE_SW160800V6_2R1
  • UATDATA
  • USERDNSDOMAIN
  • USERDOMAIN
  • USERDOMAIN_ROAMINGPROFILE
  • USERNAME
  • USERPROFILE
  • VS100COMNTOOLS
  • VS120COMNTOOLS
  • VS140COMNTOOLS
  • VS90COMNTOOLS
  • WINDIR
  • WINDOWS_TRACING_FLAGS
  • WINDOWS_TRACING_LOGFILE
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED
  • PYTHONHOME

Pipenv specific environment variables:

Debug specific environment variables:

  • PATH: C:\Program Files (x86)\Common Files\Oracle\Java\javapath;%PYTHONHOME%;%PYTHONHOME%\Scripts;D:\Sprachen\Perl\perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;l

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
Adilkemocommented, May 1, 2020

I use this code to install pipenv $ brew install pipenv it works with me fine try this code.

0reactions
techalchemycommented, Nov 20, 2018

I’m not totally certain whats best here, my initial instinct was yeah to just unset it the way we do with PIP_USER – just check if allow_global or system is set, and if not, just unset PYTHONHOME? I might override it in pipenv.environment.Environment.activated() anyway…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pipenv & Virtual Environments
Installing pipenv via Homebrew or Linuxbrew will keep pipenv and all of its dependencies in an isolated virtual environment so it doesn't interfere...
Read more >
How to pip install packages written in Pipfile without creating ...
How to pip install packages written in Pipfile without creating virtualenv? · Same as using venv, just use your local installation pip. –...
Read more >
Pipenv & Virtual Environments - Python Packaging Authority
Pipenv is designed to be used by non-privileged OS users. It is not meant to install or handle packages for the whole OS....
Read more >
How to manage your python virtualenvs with Pipenv
Installing packagePermalink · pipenv creates a Pipfile.lock file (if it does not exist already) · Once the module is installed it updates Pipfile....
Read more >
PIP Install Virtualenv - ActiveState
You need to have Python 3 (not Python 2, which is officially unsupported by python.org) already installed before you can create a virtual...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found