In a lesson in the path Data Analyst I tried to install Pipenv. Accidentally I quit the program so I did not copy the PATH. When I opened it again und tried to install it again the terminal responded pipenv is already installed. However the PATH is not shown. Where can I find it? I need it to complete the installation
What do you need the PATH for? If you mean your own path, echo $PATH
in the terminal would provide it. If you’re looking for the location of the pipenv
install then something like-
python3 -c "
import pipenv
print(pipenv.__file__)
"
would tell you where it’s being initialised from, e.g. which set of site-packages it is located at.
If for some reason pipenv
is not installed in the module lookup path for your standard python3
install then you can find which script is being invoked by your shell using which pipenv
.
It’s probably somewhere under /bin
or /usr/bin
. The first line of that script should tell you which python was being used to run pipenv
too, e.g.
$ head -n 1 $(which pipenv)
#!/home/user/project/.env/bin/python3
I made a mistake right after the installation. As shown in the video I got the Path. However, I quit the Terminal by accident. Now, I can’t find where pipenv is installed to configure the PATH. Has anybody an idea? As in the example in green from Codecademy it is stated wehere pipenv and pipenv-resolver are stored. I can’t find the place
The path it mentions seems perfectly valid, what’s wrong with it?
Since pipenv is already installed anyway you could probably use python3 -m pipenv
to make use of it, e.g. python3 -m pipenv install package_name
(which relies on the lookup path for the current Python install).
If you’ve never done it before I would suggest learning a little bit about the terminal and the command line (either on codecademy or otherwise) as it will make your life significantly easier.
Wrong with the path is that it is the example from the tutorial. I can’t find the link where my pipenv is installed
If you run python -m site
it should throw out the locations of any possible library files (the directory rather than pipnev itself). A decent first guess would be that it’s similar to the path in the path in the example.
The first example in my first reply might also provide you with the relevant info.
The actual script to run pipenv
would be a couple of levels up under bin
(refer to the tutorial path again which should be quite similar).
Alternatively python3 -m pipenv
should be fine for what you’re doing.
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.