0

I am new using pipenv and I would like to know why every time I create a virtual environment, the environment saves me with my username and not with the name of my project folder.

Steps:

  1. cd project-01/
  2. project-01> pipenv --three
  3. ls .local/share/virtualenvs/
  4. result: username-nQve7NT7

and it always sets me /home/username/ as the path of my project. I'm using Xubuntu 18.04.4 with Python 3.6.9 and pipenv 2018.11.26

Thanks.

2 Answers2

0

I'd recommend you to take a look at this post

How to rename a virtualenv in Python?

hope it helps.

Leonardo Guerreiro
  • 901
  • 1
  • 9
  • 18
0

I had this same problem and found that my issue was that there was a Pipfile and Pipfile.lock in my user directory.

I must have mistakenly run pipenv shell there at some point, and while I may have removed the environment folder, the Pipfiles remained.

I imagine pipenv must look up the file tree for a Pipfile and, if it finds one, assumes that is the project root. Removing the Pipfiles fixed the problem for me.