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 detects itself running in a virtual env even though there isn't one #4327

Closed
tonimelisma opened this issue Jun 7, 2020 · 37 comments
Closed
Labels
Type: Duplicate This issue is a duplicate of an already-existing issue.

Comments

@tonimelisma
Copy link

tonimelisma commented Jun 7, 2020

Whenever I create a new directory and run pipenv install there it says:

Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.

This, despite the fact that it's a freshly opened terminal window in a newly created directory and I'm quite sure pipenv is not running inside a virtual environment.

To top it off, it apparently then does create a new virtual environment even though it says it wouldn't..?

toni@Tonis-MacBook-Pro ~ % mkdir test3
toni@Tonis-MacBook-Pro ~ % cd test3
toni@Tonis-MacBook-Pro test3 % pipenv install --verbose --verbose
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Warning: the environment variable LANG is not set!
We recommend setting this in ~/.profile (or equivalent) for proper expected behavior.
Using python: None
Path to python: /usr/local/bin/python3
Creating a virtualenv for this project…
Pipfile: /Users/toni/test3/Pipfile
Using /usr/local/bin/python3 (3.7.7) to create virtualenv…
⠸ Creating virtual environment...created virtual environment CPython3.7.7.final.0-64 in 837ms
  creator CPython3Posix(dest=/Users/toni/.local/share/virtualenvs/test3-_bIlMMXE, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/Users/toni/Library/Application Support/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator

✔ Successfully created virtual environment! 
Virtualenv location: /Users/toni/.local/share/virtualenvs/test3-_bIlMMXE
Creating a Pipfile for this project…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (a65489)!
Installing dependencies from Pipfile.lock (a65489)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
toni@Tonis-MacBook-Pro test3 % 

$ pipenv --support

Pipenv version: '2020.6.2'

Pipenv location: '/usr/local/Cellar/pipenv/2020.6.2/libexec/lib/python3.8/site-packages/pipenv'

Python location: '/usr/local/Cellar/pipenv/2020.6.2/libexec/bin/python3.8'

Python installations found:

  • 3.7.7: /usr/local/bin/python3
  • 3.7.7: /usr/local/bin/python3.7m
  • 3.7.7: /usr/local/bin/python3.7
  • 3.7.3: /usr/bin/python3
  • 2.7.16: /usr/bin/python2
  • 2.7.16: /usr/bin/python2.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.8.3',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '19.5.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT '
                     '2020; root:xnu-6153.121.2~2/RELEASE_X86_64',
 'python_full_version': '3.8.3',
 'python_version': '3.8',
 'sys_platform': 'darwin'}

System environment variables:

  • PATH
  • TERM_PROGRAM
  • SHELL
  • TERM
  • CLICOLOR
  • TMPDIR
  • TERM_PROGRAM_VERSION
  • TERM_SESSION_ID
  • USER
  • SSH_AUTH_SOCK
  • _
  • PWD
  • XPC_FLAGS
  • XPC_SERVICE_NAME
  • SHLVL
  • HOME
  • LOGNAME
  • LC_CTYPE
  • __CF_USER_TEXT_ENCODING
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /usr/local/Cellar/pipenv/2020.6.2/libexec/tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
  • SHELL: /bin/zsh
  • PWD: /Users/toni/test3

Contents of Pipfile ('/Users/toni/test3/Pipfile'):

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

[dev-packages]

[packages]

[requires]
python_version = "3.7"

Contents of Pipfile.lock ('/Users/toni/test3/Pipfile.lock'):

{
    "_meta": {
        "hash": {
            "sha256": "7e7ef69da7248742e869378f8421880cf8f0017f96d94d086813baa518a65489"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.7"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {},
    "develop": {}
}
@frostming
Copy link
Contributor

Can you confirm whether it still happens with pipenv@master?

@ianchesal
Copy link

ianchesal commented Jun 8, 2020

FWIW I'm also seeing this with version 2020.6.2 that was brew-installed on my Mac.

Assuming https://pipenv-fork.readthedocs.io/en/latest/_modules/pipenv/environments.html#is_in_virtualenv is supposed to be the correct form for is_in_virtualenv(), this shouldn't be happening, but it is:

~
❯ echo $PIPENV_ACTIVE


~
❯ echo $PIPENV_IGNORE_VIRTUALENVS


~
❯ cd src/github-organization-manager
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Loading .env environment variables…
Launching subshell in virtual environment…
 . /Users/ichesal/.local/share/virtualenvs/github-organization-manager-Tv5zzQI-/bin/activate

I'll try with a non-brew-install pipenv using the master branch.

@acdha
Copy link
Contributor

acdha commented Jun 8, 2020

I am also using this with the Homebrew build, so it's possible that's a common link

@ianchesal
Copy link

I tried to run pipenv from the repo and I can't see how to do that without running it in a virtualenv, which kind of defeats the purpose of testing master for the same problem.

If there are instructions for running from master without polluting my local Python in doing so, can someone let me know? I'll be happy to test it.

@tonimelisma
Copy link
Author

Same here. pipenv homepage recommends homebrew to install it, isn't the latest brew supported?

@tonimelisma
Copy link
Author

On closer inspection looks like a duplicate of #4316

@frostming
Copy link
Contributor

frostming commented Jun 9, 2020

@acdha @ianchesal To be more clear __PYVENV_LAUNCHER__ is injected into the env when Python starts up, it is indeed a flaw with CPython itself and happens on MacOS specifically. The bug is not included in the releases until Python 3.9.0a1 AFAIK

Reference: https://bugs.python.org/issue22490

@frostming frostming added the Type: Duplicate This issue is a duplicate of an already-existing issue. label Jun 9, 2020
@triage-new-issues triage-new-issues bot removed the triage label Jun 9, 2020
@willbowditch
Copy link

+1 for this with pipenv, version 2020.6.2 installed via Homebrew

@mgmarino
Copy link
Contributor

mgmarino commented Jun 10, 2020

+1, on Mac OS X. I have installed pipenv via pip, but I am using pyenv for python. I see the message though when using the system version of python.

** edit ** :

Seems, however, to be fixed on master:

Install via: pip3 install git+https://github.com/pypa/pipenv.git (Note @ianchesal regarding your question, you can always uninstall and reinstall the previous version)

@willbowditch
Copy link

For me, installing the master branch in the same location as Homebrew does not fix it. So perhaps it's an interaction between pipenv and the way brew creates a venv?

➜ /usr/local/Cellar/pipenv/2020.6.2/libexec/bin/pip3 install git+https://github.com/pypa/pipenv.git
 
➜ pipenv --version
pipenv, version 2020.6.2.dev0

➜ pipenv run pip freeze
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.

@justasojourner
Copy link

justasojourner commented Jun 10, 2020

I can confirm - tested on two different macOS machines with 3.7 and 3.8 - that it is not restricted to machines with Homebrew. On one machine I had Homebrew installed but removed it totally after a short while (and never installed Python via it) on the other machine Homebrew has never been installed.

I can reproduce the issue:

  • 2020.6.2 installed
  • go to any directory, but I tested on both machines in the Python 3.8 & 3.7 Python frameworks site-packages directory
  • in directory with no virtual environment activated, with 2020.6.2 the command to output virtualenv information:

pipenv --venv

gives the error:

Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
No virtualenv has been created for this project(/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages) yet!
Aborted!
  • Uninstall 2020.6.2 and install 2018.11.26
  • pipenv --venv then gives correct result
No virtualenv has been created for this project yet!
Aborted!

It seems from that testing that the issue is in 2020.6.2 and not limited/related only to Homebrew. Not sure if it is macOS specific.

=======

Just to add... I first noticed this in PyCharm which got confused after I upgraded Pipenv (but only noticed when I started a new project) but I confirmed it via command line.

@willbowditch
Copy link

Rolling back to the previous version fixes it for me:

$(brew --cellar)/pipenv/2020.6.2/libexec/bin/pip install pipenv==2020.5.28

@TimidRobot
Copy link

As noted in #4316, this bug breaks pipenv --rm.

To manually remove a pipenv virtualenv:

pipenv_venv="$(PIPENV_IGNORE_VIRTUALENVS=1 pipenv --venv)" && rm -rf "${pipenv_venv}"

@aytekinar
Copy link

aytekinar commented Jun 21, 2020

I am observing the same problem. I have python3 installed via brew. Then, I have installed pipenv via python3 -m pip install --user --upgrade pipenv.

The following is what I have:

~/dummy> which python3
/usr/local/bin/python3
~/dummy> printenv PATH
/Users/eaytard/Library/Python/3.7/bin:/usr/local/opt/node@12/bin:/Users/eaytard/go/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
~/dummy> python3 -V
Python 3.7.7
~/dummy> python3 -m pip list | grep -i pipenv
pipenv                        2020.6.2   
~/dummy> python3 -m pipenv --python 3.7
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Creating a Pipfile for this project…
~/dummy> cat Pipfile 
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]

[requires]
python_version = "2.7"

Weird enough, even though I use python3 -m pipenv to run pipenv and use the switch --python 3.7, the corresponding Pipfile has python_version = "2.7", which is the system-installed Python version.

$ python3 -m pipenv --support

Pipenv version: '2020.6.2'

Pipenv location: '/Users/eaytard/Library/Python/3.7/lib/python/site-packages/pipenv'

Python location: '/usr/local/opt/python/bin/python3.7'

Python installations found:

  • 3.7.7: /usr/local/bin/python3
  • 3.7.7: /usr/local/bin/python3.7m
  • 3.7.7: /usr/local/bin/python3.7
  • 3.7.3: /usr/bin/python3
  • 2.7.16: /usr/bin/python2
  • 2.7.16: /usr/bin/python2.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.7.7',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '19.5.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT '
                     '2020; root:xnu-6153.121.2~2/RELEASE_X86_64',
 'python_full_version': '3.7.7',
 'python_version': '3.7',
 'sys_platform': 'darwin'}

System environment variables:

  • GH_BASE_DIR
  • GPG_TTY
  • HOME
  • LANG
  • LC_ALL
  • LC_CTYPE
  • LOGNAME
  • OMF_CONFIG
  • OMF_PATH
  • PATH
  • PWD
  • SHELL
  • SHLVL
  • SSH_AUTH_SOCK
  • TERM
  • TERM_PROGRAM
  • TERM_PROGRAM_VERSION
  • TERM_SESSION_ID
  • TMPDIR
  • USER
  • XPC_FLAGS
  • XPC_SERVICE_NAME
  • __CF_USER_TEXT_ENCODING
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /Users/eaytard/Library/Python/3.7/bin:/usr/local/opt/node@12/bin:/Users/eaytard/go/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
  • SHELL: /usr/local/bin/fish
  • LANG: en_US.UTF-8
  • PWD: /Users/eaytard/dummy

Contents of Pipfile ('/Users/eaytard/dummy/Pipfile'):

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

[dev-packages]

[packages]

[requires]
python_version = "2.7"

@tsela
Copy link

tsela commented Jun 24, 2020

I have the exact same issue with both pipenv and pyenv installed via brew, but on Linux rather than MacOS. In my case pipenv --rm does work, but everything described by others applies to me as well.

@charlesfig
Copy link

I am observing the same problem. I have python3 installed via brew. Then, I have installed pipenv via python3 -m pip install --user --upgrade pipenv.

The following is what I have:

~/dummy> which python3
/usr/local/bin/python3
~/dummy> printenv PATH
/Users/eaytard/Library/Python/3.7/bin:/usr/local/opt/node@12/bin:/Users/eaytard/go/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
~/dummy> python3 -V
Python 3.7.7
~/dummy> python3 -m pip list | grep -i pipenv
pipenv                        2020.6.2   
~/dummy> python3 -m pipenv --python 3.7
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Creating a Pipfile for this project…
~/dummy> cat Pipfile 
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]

[requires]
python_version = "2.7"

Weird enough, even though I use python3 -m pipenv to run pipenv and use the switch --python 3.7, the corresponding Pipfile has python_version = "2.7", which is the system-installed Python version.

$ python3 -m pipenv --support

Regarding the versioning, I was also getting the python_version = "2.7" error.
Getting the path to python3 through which python3 and running pipenv install --python /path/to/python3 seems to have solved this problem.

@aytekinar
Copy link

Thank you for the heads-up. However, I still have the problem. Check below (using fish as my shell):

~/dummy> pipenv install --python (which python) # or, python3 -m pipenv install --python (which python)
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically
use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1
to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to
suppress this warning.
Creating a Pipfile for this project…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (dfae9f)!
Installing dependencies from Pipfile.lock (dfae9f)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
 ~/dummy> cat Pipfile
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]

[requires]
python_version = "2.7"

@ruslaniv
Copy link

ruslaniv commented Jul 1, 2020

Yes, same problem. Just reinstalled Catalina, installed pipenv via Homebrew and on the very first test run was greeted with :

Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project.

Although it did proceed and created virtual environment.

@AdamOlczak
Copy link

AdamOlczak commented Jul 4, 2020

Did a little of digging here and I was able to fix it by following these steps

  1. make sure /url/local/bin is in front of your $PATH variable
> echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public
  1. uninstall all python's installed through homebrew, python3, (if you've installed pipenv through it remember to uninstall python@3.8)
    Note: you may be required to manually do sudo rm -rf /usr/local/Cellar/python/3.7.7 but homebrew will tell you to do so if necessary
    This should leave you with only python 3 provided by MacOS

  2. quit your terminal and open new one

  3. Make sure you still have /usr/local/bin in front of your $PATH variable

  4. install python through homebrew brew install python3

  5. python3 binary should point to /usr/local/bin/python3

>  ls -l $(which python3)
lrwxr-xr-x  1 adamolczak  admin  34 Jul  4 13:11 /usr/local/bin/python3 -> ../Cellar/python/3.7.8/bin/python3
  1. install pipenv using pip3

Doing that did solve the issue when previously for some reason sys.real_path was being set which triggered the message above

@TommeyChang
Copy link

I did not uninstall the python, but only reinstall the pipenv via pip3. The problem is fixed.

@robhafemeister
Copy link

I removed pipenv from brew then reinstalled pipenv via pip3 and all is good now.

@aytekinar
Copy link

I have recently removed python@3.7 and installed python@3.8. I have run python3 -m pip install --user --upgrade pip pipenv to have the following in my user-space:

~> python3 -m pip list --user 
Package          Version
---------------- ---------
appdirs          1.4.4
certifi          2020.6.20
distlib          0.3.1
filelock         3.0.12
pip              20.1.1
pipenv           2020.6.2
six              1.15.0
virtualenv       20.0.26
virtualenv-clone 0.5.4

With this change, I do not have the problem anymore. python3 -m pipenv --python 3 and many other commands are now functioning as intended.

@nate-benton90
Copy link

I removed pipenv from brew then reinstalled pipenv via pip3 and all is good now.

This worked for me as well on macOS Catalina (v. 10.15.4). That's all good, but I'd really like to know why this solution seems to work. Can anybody provide some insight on this?

@alechp
Copy link

alechp commented Jul 21, 2020

@nate-benton90 #4316

@alechp
Copy link

alechp commented Jul 21, 2020

Also, as far as hacky fixes go, installing dependencies via pipenv shell worked for me:

Screen Shot 2020-07-20 at 7 42 50 PM

(pym is just an alias for python main.py)

@Per48edjes
Copy link

Per48edjes commented Jul 21, 2020

Rolling back to the previous version fixes it for me:

$(brew --cellar)/pipenv/2020.6.2/libexec/bin/pip install pipenv==2020.5.28

This is a great interim solution, @willbowditch -- thank you.

Based on the directory structure (read: enclosed within Homebrew's Cellar directory), this sidesteps having to pollute your system Python environment (i.e., pipenv doesn't show up when I run pip list not in a virtualenv). Am I understanding that it simply rolls back the pipenv version within the virtualenv in Homebrew?

@dsayling
Copy link

Also confirmed 2020.5.28 works as expected on macOS.

@ruslaniv
Copy link

ruslaniv commented Nov 6, 2020

Why was this closed?
I'm using the latest version from homebrew pipenv, version 2020.11.4 and I'm still getting this error.
Downgrading is not a solution but just a temporary workaround.

@frostming frostming reopened this Nov 6, 2020
@frostming
Copy link
Contributor

frostming commented Nov 6, 2020

@ruslaniv Can you paste the command output together with pipenv --support?

At least I can't reproduce with the same version installed from homebrew

@ruslaniv
Copy link

ruslaniv commented Nov 6, 2020

@frostming

[rsln-u7WGlhGX]ruslan@rsln:~/OneDrive/Home/Dev/projects/personal/rsln|f_blog 
⇒  pipenv --venv   
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
/Users/ruslan/.local/share/virtualenvs/rsln-u7WGlhGX
$ pipenv --support

Pipenv version: '2020.11.4'

Pipenv location: '/usr/local/Cellar/pipenv/2020.11.4/libexec/lib/python3.9/site-packages/pipenv'

Python location: '/usr/local/Cellar/pipenv/2020.11.4/libexec/bin/python'

Python installations found:

  • 3.9.0: /usr/local/bin/python3
  • 3.9.0: /usr/local/bin/python3.9
  • 3.8.6: /usr/local/opt/python@3.8/bin/python3
  • 3.8.6: /usr/local/opt/python@3.8/bin/python3.8
  • 3.8.6: /usr/local/bin/python3.8
  • 3.8.3: /Users/ruslan/.pyenv/versions/3.8.3/bin/python3
  • 3.7.3: /usr/bin/python3
  • 3.6.7: /Users/ruslan/.pyenv/versions/3.6.7/bin/python3
  • 3.5.9: /Users/ruslan/.pyenv/versions/3.5.9/bin/python3
  • 2.7.16: /usr/bin/python2
  • 2.7.16: /usr/bin/python2.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.9.0',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '19.6.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT '
                     '2020; root:xnu-6153.141.2~1/RELEASE_X86_64',
 'python_full_version': '3.9.0',
 'python_version': '3.9',
 'sys_platform': 'darwin'}

System environment variables:

  • PATH
  • NVM_INC
  • AUTOJUMP_ERROR_PATH
  • TERM_PROGRAM
  • NVM_CD_FLAGS
  • AUTOJUMP_SOURCED
  • TERM
  • SHELL
  • TMPDIR
  • TERM_PROGRAM_VERSION
  • TERM_SESSION_ID
  • ZSH
  • NVM_DIR
  • USER
  • SSH_AUTH_SOCK
  • __CF_USER_TEXT_ENCODING
  • VIRTUAL_ENV_DISABLE_PROMPT
  • PAGER
  • LSCOLORS
  • _
  • PWD
  • LANG
  • ITERM_PROFILE
  • XPC_FLAGS
  • XPC_SERVICE_NAME
  • PYENV_SHELL
  • SHLVL
  • HOME
  • COLORFGBG
  • LC_TERMINAL_VERSION
  • ITERM_SESSION_ID
  • LESS
  • LOGNAME
  • LC_CTYPE
  • NVM_BIN
  • LC_TERMINAL
  • COLORTERM
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /usr/local/Cellar/pipenv/2020.11.4/libexec/tools:/Users/ruslan/.nvm/versions/node/v14.8.0/bin:/Users/ruslan/.pyenv/shims:/usr/local/opt/python@3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public
  • SHELL: /bin/zsh
  • LANG: en_US.UTF-8
  • PWD: /Users/ruslan/OneDrive/Home

@frostming
Copy link
Contributor

The warning only show when VIRTUAL_ENV is set. Can you show the output of

$ /usr/local/Cellar/pipenv/2020.11.4/libexec/bin/python -c "from pipenv import environments;print(environments.is_in_virtualenv())"

Did you set VIRTUAL_ENV somewhere?

@damonmaria
Copy link

Just FYI, I was having this issue but a pipenv update (through homebrew) fixed it. Possibly what others are seeing now is a new issue.

@tonimelisma
Copy link
Author

Fixed for me on 2020.11.4 as well.

@oliverkuo17
Copy link

Have tried every solution aboved but still getting this error. I am using the latest version of pipenv: 2020.11.15

@moonhuntercode
Copy link

moonhuntercode commented Feb 4, 2021

Have tried every solution aboved but still getting this error. I am using the latest version of pipenv: 2020.11.15

yo también lo tengo el mismo error.
still getting this error but now i will try pyenv, has anyone tried pyenv?
https://towardsdatascience.com/python-environment-101-1d68bda3094d

@moonhuntercode
Copy link

encontré una solución es haciendo todo el proceso sin salir de la primer consola, dejé de hacer el codigo en la terminal de vscode, en la misma ventana de cmd que instalé pipenv y cree el entorno virtual,ahí mismo estoy haciendo todo y no me sale esas advertencias y errores.
english:
I found a solution is doing the whole process without leaving the first console, I stopped doing the code in the vscode terminal, in the same cmd window that I installed pipenv and created the virtual environment, right there I am doing everything and it does not come out those warnings and errors

@gosuto-inzasheru
Copy link

sudo pipenv --rm fixed this for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Duplicate This issue is a duplicate of an already-existing issue.
Projects
None yet
Development

No branches or pull requests