171👍
The following should give you the paths
$ pipenv --where
/home/wonder/workspace/myproj
$ pipenv --venv
/home/wonder/PyEnvs/myproj-BKbQCeJj
16👍
Adding to Sewagodimo Matlapeng’s answer for the second part of the question:
can configure it to use a custom path for newly created virtualenv?
According to documentation, you can set the base location for the virtualenvs with the environment variable WORKON_HOME
. If you want to place the virtualenv specifically in <project>/.venv
, set the environment variable PIPENV_VENV_IN_PROJECT
.
e.g., running:
export WORKON_HOME=/tmp
pipenv install
Would place the virtualenv in /tmp/<projectname>-<hash>
.
- [Django]-How do you configure Django for simple development and deployment?
- [Django]-How to update() a single model instance retrieved by get() on Django ORM?
- [Django]-Why doesn't django's model.save() call full_clean()?
4👍
You can check the documentation in "Usage" section:
https://github.com/pypa/pipenv#usage
You can find these two options:
- –where Output project home information.
- –venv Output virtualenv information.
The option "–venv" gives you the virtualenv path.
Or better here:
https://github.com/pypa/pipenv#locate-the-virtualenv
BR
- [Django]-Django: Why do some model fields clash with each other?
- [Django]-Querying django migrations table
- [Django]-Why won't Django use IPython?
0👍
I create a command to handle this:
From line 12 ~ 105
Usage: pipenv_correspond [OPTION]
OPTION:
ls, --list list all the corresponding projects_root & venvs
uls, --useless list all the not existing projects_roots that still have corresponding venvs
npr, --no-project-root hide projects_root
rm, --remove remove all the venvs from command: "ls" or "uls", deafult is use "uls"
# example
$ pipenv_correspond ls
There have some options that suggest you enable this command:
- Recommend, create a
~/.customfunction
file and
paste it, then use this command:
$ echo '# customfunction\nsource ~/.customfunction' >> <shell_profile>
shell_profile, e.g. ~/.bash_profile
, ~/.zshrc
- you can copy this code from
line 12 ~ 105
to your shell_profile.
- [Django]-Django: Reference to an outer query may only be used in a subquery
- [Django]-Add a custom button to a Django application's admin page
- [Django]-WSGI vs uWSGi with Nginx
- [Django]-Django + Ajax
- [Django]-Best practices for adding .gitignore file for Python projects?
- [Django]-How do I run tests for all my Django apps only?