When you make a mistake in the directory where you execute `pipenv install`

Overview

I mistakenly executed the directory for pipenv install in the child directory.

Then, even if you execute it again in the parent directory that you originally wanted to build the environment and do pipenv shell, It is a memo because I was in trouble because I moved to the wrong child directory without permission and it was executed in that environment.

Q. Where is the virtual environment created in the first place?

A. Answer, it seems that a virtual environment will be created under ~/.local/share/virtualenvs / by default.

After doing pipenv install, I wondered where the virtual environment would be and tried to find out.

The selfish image seems to be different if I thought that the configuration file was placed under the execution of pipenv install.

To the last, Pipfile and Pipfile.lock are the setting contents of environment construction, and it seems that the environment built using it is placed in another place.

Solutions

So, based on the above

  1. Go to ~/.local/share/virtualenvs /

  2. Check the directory of the virtual environment that was built by mistake with ls, and delete it entirely with therm -r <dir>command.

  3. Move to the directory you originally wanted to build the environment and try again pipenv install

reference

https://qiita.com/tonluqclml/items/cd0d2a2cb0197cbaee42 https://qiita.com/propella/items/ea29d6a62fdf75f1b421

Recommended Posts

When you make a mistake in the directory where you execute `pipenv install`
Check in advance what happens when you execute the command
Install Django in a pipenv virtual environment
Install the Python module in any directory
A shell script to make sure you don't forget the pipenv shell again
A story when a directory is buggy with the django-admin start project command in a virtual environment using Pipenv
Make a copy of the list in Python
I get a strange window when I use the open directory dialog in Tkinter
You walk in a spiral in a world where the walls of the cross rise (simulation)
When you want to plt.save in a for statement
Make a note of what you want to do in the future with Raspberry Pi
[Small story] A painstaking measure when you have to execute a function before import in Python
Check the argument type annotation when executing a function in Python and make an error
[Python] When you want to import and use your own package in the upper directory
[Sublime Text 2] Always execute a specific file in the project
Add "/" at the end when completing a directory symbolic link
Introducing sites where you can see trends in the 2019 framework
Put the lists together in pandas to make a DataFrame
[Note] Import of a file in the parent directory in Python
Write a script in Shell and Python to notify you in Slack when the process is finished
If you are a beginner in programming, why not make a "game" for the time being? The story
Make a bookmarklet in Python
[Subprocess] When you want to execute another Python program in Python code
The story that a hash error came out when using Pipenv
The case where Tokyo looked like a vomit in Chiba prefecture
Mode line when you open the appropriate Python code in Vim
Save the Pydrive authentication file in a different directory from the script