Issues running pipenv & pyenv
See original GitHub issueI am unable do activate virtualenv using pipenv shell
with python managed by pyenv.
Here is the output of my terminal:
roger@ohm:/tmp/lab $ pipenv --venv
No virtualenv has been created for this project yet!
roger@ohm:/tmp/lab $ pipenv install requests
Creating a Pipfile for this project...
Creating a virtualenv for this project...
⠋Using base prefix '/home/roger/.pyenv/versions/3.6.1'
New python executable in /home/roger/.local/share/virtualenvs/lab-O8QxVB32/bin/python3.6
Also creating executable in /home/roger/.local/share/virtualenvs/lab-O8QxVB32/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /home/roger/.local/share/virtualenvs/lab-O8QxVB32
Installing requests...
Collecting requests
Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests)
Using cached urllib3-1.22-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests)
Using cached idna-2.6-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests)
Using cached certifi-2017.7.27.1-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests)
Using cached chardet-3.0.4-py2.py3-none-any.whl
Installing collected packages: urllib3, idna, certifi, chardet, requests
Successfully installed certifi-2017.7.27.1 chardet-3.0.4 idna-2.6 requests-2.18.4 urllib3-1.22
Adding requests to Pipfile's [packages]...
P.S. You have excellent taste! ✨ 🍰 ✨
roger@ohm:/tmp/lab $ pipenv shell
ERROR: The virtualenv hasn't been activated correctly.
Either the env is corrupted (try running `pew restore env`),
Or an upgrade of your Python version broke your env,
Or check the contents of your $PATH. You might be adding new directories to it
from inside your shell's configuration file.
In this case, for further details please see: https://github.com/berdario/pew#the-environment-doesnt-seem-to-be-activated
I followed the steps of the URL above, changing PATH order, but no sucess.
Issue Analytics
- State:
- Created 6 years ago
- Comments:30 (19 by maintainers)
Top Results From Across the Web
Frequently Encountered Pipenv Problems - Read the Docs
This is usually a result of mixing Pipenv with system packages. We strongly recommend installing Pipenv in an isolated environment. Uninstall all existing ......
Read more >How to Manage your Python Projects with Pipenv and Pyenv
A Python virtual environment is an important tool for developers to separate project dependencies in isolated environments.
Read more >Why is Pipenv not picking up my Pyenv versions?
You can try this to make Pipenv follow the Pyenv Python version: Direct Pipenv to the Pyenv shim in your shell config file...
Read more >PyEnv && Pipenv - Medium
Pyenv sort of hijacks the pip command, to make sure you're working in the correct environment. After this you're ready to start using...
Read more >Python Environment 101 - Towards Data Science
In this article, I am focusing on pyenv and pipenv since virtualenv alone will have a problem when you update your system Python...
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
What weird things are you referring to? I’ve used
pyenv
for years and have never had problems withpip
,virtualenv
, or any other packages I’ve installed.How else do people manage the installation and selection of multiple Python versions? I think the usage of
pyenv
is more common than you let on. 😄Just install Pipenv anywhere (as long as you can run it), and yes, it would just work. You don’t even need to add the shim directory to
PATH
orpyenv global
anything (basically you don’t need the shims). All you need to set is thePYENV_ROOT
environment variable.