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.

Why I can create only one virtualenv

See original GitHub issue

Hey, I installed pipenv with brew install pipenv, the version of Python and pipenv are:

  • Python: 3.6.5
  • pipenv: 2018.5.18

But now I can only create one virtualenv with python:3.6.5, no matter where I am:

~
•100% ➜ cd hello

~/hello
•100% ➜ pipenv --three
Creating a virtualenv for this project…
Using /usr/local/bin/python3 (3.6.5) to create virtualenv…
⠋Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/jack/.local/share/virtualenvs/jack-JNXsLa7q/bin/python3.6
Also creating executable in /Users/jack/.local/share/virtualenvs/jack-JNXsLa7q/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /Users/jack/.local/share/virtualenvs/jack-JNXsLa7q

~/hello took 8s
•100% ➜ pipenv --rm
Removing virtualenv (/Users/jack/.local/share/virtualenvs/jack-JNXsLa7q)…

~/hello
•100% ➜ cd ../world

~/world
•100% ➜ pipenv --three
Creating a virtualenv for this project…
Using /usr/local/bin/python3 (3.6.5) to create virtualenv…
⠋Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/jack/.local/share/virtualenvs/jack-JNXsLa7q/bin/python3.6
Also creating executable in /Users/jack/.local/share/virtualenvs/jack-JNXsLa7q/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /Users/jack/.local/share/virtualenvs/jack-JNXsLa7q

~/world took 7s
•100% ➜ cd ;pwd
/Users/jack

The two projects’ virtualenv path are the same: /Users/jack/.local/share/virtualenvs/jack-JNXsLa7q.

IMO, the Python virtualenv should be located at:

  • /Users/jack/.local/share/virtualenvs/hello-JNXsLa7q
  • /Users/jack/.local/share/virtualenvs/world-JNXsLa7q

based on the video instructor at https://docs.pipenv.org/

But they all use the home folder’s name, so the Pipfile is located at /Users/jack.

Look forward for your help & reply. 😃

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
gsemetcommented, May 13, 2018

you probably have a pipfile in your home folder. Pipenv looks for the first pipfile in one of the parent folder

0reactions
uranusjrcommented, May 13, 2018

Discussion in #2188.

Read more comments on GitHub >

github_iconTop Results From Across the Web

venv — Creation of virtual environments — Python 3.11.1 ...
Multiple paths can be given to venv , in which case an identical virtual environment will be created, according to the given options,...
Read more >
What is a virtualenv, and why should I use one? - Stack Overflow
Virtualenv can help you create a separate environment where you don't need root privileges as well as be able to tailor the environment ......
Read more >
Virtual environments for absolute beginners — what is it and ...
Install virtualenv package using pip: We simply install it by calling pip install virtualenv · Virtualenv is correctly install if you can execute...
Read more >
Python virtualenv and venv dos and don'ts - InfoWorld
Python virtual environments shine for keeping projects and conflicting packages separate. Just keep these dos and don'ts in mind.
Read more >
Python Virtual Environments: A Primer
In this tutorial, you'll learn how to work with Python's venv module to create and manage separate virtual environments for your 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