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 shell creates new virtualenv

See original GitHub issue

I forgot to cd to my project dir before running pipenv shell, and it created a new virtualenv.

Describe your environment

Windows 10 Python 3.6.4 Pipenv version: 11.1.5

Expected result

I would expect pipenv shell to fail when there is no virtualenv to start a shell for. I didn’t see anything in the docs about the shell command creating a virtualenv and Pipfile.

Actual result

A virtualenv was created and then a Pipfile and then pipenv crashed with a SyntaxError (but I see there’s already an issue for that).

Steps to replicate

Run pipenv shell in a directory with no Pipfile.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
kennethreitzcommented, Mar 8, 2018

this is intended behavior

0reactions
uranusjrcommented, Sep 21, 2018

I feel a PEEP proposing an environment variable disabling auto virtual environment creation in general (on just for shell) could be appropriate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pipenv shell command creates new venv instead of loading ...
pipenv creates a new . venv file in the current directory instead of loading the environment from ~/.
Read more >
pipenv always create new virtualenv if ... - GitHub
Issue description When the environment variable PIPENV_SITE_PACKAGES is set, pipenv always recreate new virtualenv on each invoke of pipenv ...
Read more >
Pipenv & Virtual Environments
virtualenv is a tool to create isolated Python environments. virtualenv creates a folder which contains all the necessary executables to use the packages...
Read more >
How to manage your python virtualenvs with Pipenv - Medium
If you want to create a fresh env then click on the Pipenv environment and select the base interpreter as the desired version...
Read more >
How to create a virtual Python shell - ActiveState
Create a Virtual Environment Shell with Venv · Cd into the directory where you would like to create the project · Enter python...
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