Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pipenv incorrectly creating Pipfile in user's home directory

I want to make a project and virtualenv in /users/me/my-project In the past, when I've done this I:

  1. cd into the project folder, here my-project
  2. run pipenv shell to create do the setup and start interactive session
  3. run pipenv install to install the packages I want.

In the past, this has worked fine - the pipfile exists in the project director and virtualenv is mapped correctly. For some reason, now it is making the Pipfile in the parent directory, /users/me/. I've also tried doing pipenv in a sub directory in my project, and it still creates it in the home directory as before.

What did I do wrong?

like image 214
Peter Avatar asked Oct 16 '25 02:10

Peter


1 Answers

I had the same problem, and I found it was because that I had run the command:

pipenv shell

under my home dir some day before.

You can solve it like this:

  1. cd to your home dir
  2. delete the Pipfile
  3. delete the Pipfile.lock
like image 60
Lucian Yang Avatar answered Oct 18 '25 15:10

Lucian Yang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!