The cousin of pipenv shell doesn't activate env
See original GitHub issueI somehow doubt this is an issue with pipenv
, as it works as expected on the Windows7 machine at work. But on my OSX 10.12.6, with pyenv
-installed pythons and homebrew-installed pipenv
, issues arise:
I create a .venv with pipenv
and run pipenv shell
, but the virtual environment doesn’t activate… python
and pip
are still the global commands.
I could use some help figuring what I did wrong.
Please run $ python -m pipenv.help
, and paste the results here.
/usr/bin/python: No module named pipenv
(This is output after pipenv shell
)
Expected result
Running pipenv shell
should let you run python
and pip
being the commands from within the environment.
Actual result
python
and pip
use the global commands.
Steps to replicate
Provide the steps to replicate (which usually at least includes the commands and the Pipfile).
~ » mkdir temp
~ » cd temp
temp » pipenv --python 3.6
Creating a virtualenv for this project…
Using /usr/local/bin/python3.6m (3.6.5) to create virtualenv…
⠋Running virtualenv with interpreter /usr/local/bin/python3.6m
Using base prefix '/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/chrisdev/temp/.venv/bin/python3.6
Also creating executable in /Users/chrisdev/temp/.venv/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /Users/chrisdev/temp/.venv
Creating a Pipfile for this project…
temp » pipenv shell
Launching subshell in virtual environment. Type 'exit' or 'Ctrl+D' to return.
temp » python --version
Python 2.7.10
temp » python3 --version
Python 3.6.5
temp » pipenv --py
/Users/chrisdev/temp/.venv/bin/python
temp » which python3
/usr/local/bin/python3
temp » which python
/usr/bin/python
temp » echo $PATH
/usr/local/opt/sqlite/bin:.:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/bin
temp » which pip
/usr/local/bin/pip
temp » echo $VIRTUAL_ENV
/Users/chrisdev/temp/.venv
Issue Analytics
- State:
- Created 5 years ago
- Comments:18 (8 by maintainers)
Top Results From Across the Web
pipenv shell, does not activate the virtual environment
pipenv uses virtualenv. The env that pipenv creates has an activate you can call just like one created with virtualenv, because it was...
Read more >Advanced Usage of Pipenv - Python Packaging Authority
This document covers some of Pipenv's more glorious and advanced features. ... To activate this project's virtualenv, run the following: $ pipenv shell....
Read more >Manage Virtual Environments - menziess blog
In this post we will take a look at using Pipenv, a dependency manager for python, to boost your python workflow. Topics.
Read more >pipenv Documentation
shell will spawn a shell with the virtualenv activated. This shell can be deactivated by ... If set, Pipenv does not attempt to...
Read more >Pipenv shell doesn't work - Command Line
Hi everyone! I faced the identical issue but with Git Bash. I call pipenv shell and get “Launching subshell in virtual environment…” and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@techalchemy I can only imagine how much you have to go through supporting this tool.
Going through this experience, I now “get it”… or so I think… It now makes sense why I was having that issue, but I would never had guessed (nor realized from reading other issues) that I would need homebrew’s python central to my workflow.
Thanks for all your help!!
For anyone reading this far, to resolve my own issue, I removed the brew-installed pipenv and
pip install pipenv
on my system python (which is actually homebrew’spython@2
). Now it works like a charm.@Chris-May yeah we need to fix those, that’s all on us and not on you, we deal with a ton of issues related to homebrew but I have no idea who maintains the pipenv release there or how it works or anything, I don’t use or have access to a mac myself