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.

Default virtualenv location and pipenv shell problems

See original GitHub issue

Hello, i have noticed that pipenv creates virtualenv in new directory, which is highly unacceptable for our company, because of our project deployment tools are targeting .venv in project directory. How do we configure that? Also, hiding virtualenv on .local/share/virtualenv looks like bad practice:

  1. you never know if virtualenv you need exists
  2. system gets polluted with different virtualenvs
  3. you now need to manually handle virtualenvs
  4. it is harder to work with if you need to recreate virtualenv manually — this is just not obvious.

Virtualenv location: /home/asyncee/.local/share/virtualenvs/project

And secondly, i get this error after running pipenv shell:

Spawning environment shell (/bin/zsh).
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

Yesterday (before new location) everything was working fine — my python installation did not change.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:23
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

49reactions
kennethreitzcommented, Feb 1, 2017

no plans for making it configurable.

it sounds like your shell is not properly configured.

9reactions
kennethreitzcommented, Feb 2, 2017

released!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently Encountered Pipenv Problems - Read the Docs
Pipenv by default uses the Python it is installed against to create the virtualenv. You can set the --python option, or $PYENV_ROOT/shims/python to...
Read more >
Get path of virtual environment in pipenv - Stack Overflow
According to documentation, you can set the base location for the virtualenvs with the environment variable WORKON_HOME . If you want to place...
Read more >
Pipenv & Virtual Environments
virtualenv creates a folder which contains all the necessary executables to use the packages that a Python project would need. It can be...
Read more >
Manage Virtual Environments - menziess blog
Pipenv installs packages in ~/.local/share/virtualenvs/<your-virtualenv> by default. I prefer to place the folder containing the virtual environment in the ...
Read more >
pipenv Documentation - Read the Docs
Automatically creates a virtualenv in a standard customizable location. ... If you experience issues with $ pipenv shell, just check the PIPENV_SHELL ...
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