-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flag for PIPENV_VENV_IN_PROJECT #4489
Comments
@cupcakearmy I think that the ability to specify where the virtualenvs live already exists in two forms: Within pipenv you can specify that you want the virtualenv created within the project: Unfortunately that feature may be under documented as I only found reference to it in that Docker containers section, but it is not specific to docker containers.
Ref: https://stackoverflow.com/questions/12184846/where-should-virtualenvs-be-created All of that being said, I feel like your issue may be fulfilled by the existing options combined with the new functionality being proposed in: #4974 and #1226 If you agree please feel free to comment and close the ticket. |
I think a flag in the cli would still be the way to go. Most people don't read docs to the end and mostly discover tools by using them. This means exploring what flags are available. I know it's not ideal but the reality 😉 |
@cupcakearmy While #4974 is currently proposing an environment variable, it is conceivable it could be also applied as a flag in the cli -- maybe you could coordinate with @darelf on the PR that is open to consider the most use cases? |
This was updated recently and the behavior is now: Pipenv will now ignore .venv in the project when PIPENV_VENV_IN_PROJECT variable is False. Unset variable maintains the existing behavior of preferring to use the project’s .venv should it exist. #2763 |
Is your feature request related to a problem? Please describe.
Installing pipenv in the current folder is a pain.
There is a trick that if you create a
.venv
folder before initializing pipenv it will install locally, but that's far from user friendly.I don't share the opinion that envs should be outside the project as default, but that was discussed enough.
At least give us simple flag instead needing to setting env vars.....
Again, the "trick" with creating the
.venv
folder works like a charm, however it's implicit knowledge, as a new user to pipenv it's impossible to know. just bad DX. a flag is easily discovered withpipenv install --help
That said, I'm VERY grateful that python finally gets a way to manage dependencies in a sane manner.
Describe the solution you'd like
add a flag like
--env-folder .venv
.e.g. that the user can override the default path.or simply
--venv-in-project
to stay consistent with the env variable.Up to you really.
Describe alternatives you've considered
Edit: Feel free to close it if it was already discussed or there is another issue for that that I missed
(This exposes the username and other stuff if simply copied publicly....)
$ pipenv --support
Pipenv version:
'2020.8.13'
Pipenv location:
'/usr/local/Cellar/pipenv/2020.8.13_1/libexec/lib/python3.9/site-packages/pipenv'
Python location:
'/usr/local/Cellar/pipenv/2020.8.13_1/libexec/bin/python'
Python installations found:
3.8.6
:/usr/local/bin/python3
3.8.6
:/usr/local/bin/python3.8
3.8.2
:/usr/bin/python3
2.7.16
:/usr/bin/python2
2.7.16
:/usr/bin/python2.7
PEP 508 Information:
System environment variables:
Pipenv–specific environment variables:
Debug–specific environment variables:
The text was updated successfully, but these errors were encountered: