-
-
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
Default virtualenv location and pipenv shell problems #178
Comments
no plans for making it configurable. it sounds like your shell is not properly configured. |
added |
this will also restore your shell functionality, although i would recommend fixing your shell configuration. |
Thank you very much! I figured out that in new version you did use |
released! |
As a note, now that the original "put virtualenv in project dir" default behavior has been changed (sadly), the Pipenv README should be changed. It shows a virtualenv getting created in the project dir. |
Hey @pauleveritt, just to be clear, the virtualenv in project dir functionality is still available but now requires an environment variable I can only find one reference to a venv in the local directory and I don't know if I'd consider that terribly misleading. We could change the path displayed but I'm not sure if that provides any significant improvement in understanding. Each project will tell you where it's installed at initialization and is easy to find with |
Yep, I gave that env var a try and it worked. However, it’s no longer the default behavior, so I thought I’d note that the home page is out of date in that regard.
I agree it is a minor detail, and it’s likely only me that notices it, because I’m disappointed at the change of default. But that’s an emacs vs. vi argument that doesn’t need to be re-opened.
—Paul
… On Feb 24, 2017, at 9:42 AM, Nate Prewitt ***@***.***> wrote:
Hey @pauleveritt <https://github.com/pauleveritt>, just to be clear, the virtualenv in project dir functionality is still available but now requires an environment variable PIPENV_VENV_IN_PROJECT to activate. Placing this in your bash profile will enable this functionality as the default.
I can only find one reference to a venv in the local directory and I don't know if I'd consider that terribly misleading. We could change the path displayed but I'm not sure if that provides any significant improvement in understanding. Each project will tell you where it's installed at initialization and is easy to find with pipenv --where.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <https://github.com/kennethreitz/pipenv/issues/178#issuecomment-282307779>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAbx5jdMB_3oEnMZ9Zw0iSWqeAgtD5DVks5rfuxngaJpZM4LzhjH>.
|
So scratch that on |
I think at the moment I'm only proposing a change of:
...to show the virtualenv location at It would have helped me if it said, instead of:
...perhaps |
This was a design change in 3.3.0 when we moved to I've updated the path in the README and I'll run rewording up the flagpole to @kennethreitz, if he has opinions here. Thanks for checking in on this @pauleveritt :) |
Hrm, this doesn't work as expected:
Pipfile found at /Users/myusername/Desktop/dev/projectname/Pipfile. Considering this to be the project home. What I would expect is: Then I can programmatically use pipenv --where with other shell commands to do things like manually linking system opencv. |
@madhavajay Maybe you’re looking for |
I believe @uranusjr is correct. --where is intended for the location of the Pipfile, --venv will give you the location of the virtualenv. |
Oh awesome thank you, that makes more sense. 👍 |
From a system administration perspective, it makes more sense to default to store the venv in the project, because if we simply remove the project, there are no artifacts on the system. Also, it does not appear to be instinctive to know which venv are artifacts (to save space). From a developer perspective, it makes more sense to default to store the venv in the project, because it means we can simply share the projects folder with someone else, no installation step required. Which was one of the purposes of the initial venv. From https://virtualenv.pypa.io/en/latest/:
About the softwares that need a central location for the venv (I must warn that I don't know all the reasons those softwares need a central location). From my point of view, those softwares could:
To conclude, I don't see any advantages (except for third party utilities) to have a central location for venv (please correct me on this). I understand that it would involve some work for third party utilities, but I think this is the kind of change that should be made on a major update. |
I just want to point out this makes installing packages from |
Please add an option in the |
@alexchandel It doesn't defeat the purpose. The purpose isn't to share your It also doesn't affect anything at all regarding docker. When you build your docker image, you can make a script that calls Pipenv's default behavior of putting the venv outside the project folder is used by most other virtualenv management tools, and it makes perfect sense because it discourages people from sharing the ".venv" folder with others (since it's huge and contains package versions that may not work on the other user's machine). The Pipfile and Pipfile.lock already guarantee that every user will install the exact versions of each package. But that they will get the version appropriate for their own platform. And I am not joking: This IS a problem. Try doing Furthermore, the The Literally the ONLY thing that's harmed by the "default to outside the project folder" behavior is that it leaves a lot of garbage on your system if you move/rename a project folder. Technically, someone could code a tool which scans all of your virtualenv folders ( |
New ticket: #4934 |
Hello, i have noticed that pipenv creates virtualenv in new directory, which is highly unacceptable for our company, because of our project deployment tools are targeting .venv in project directory. How do we configure that? Also, hiding virtualenv on .local/share/virtualenv looks like bad practice:
Virtualenv location: /home/asyncee/.local/share/virtualenvs/project
And secondly, i get this error after running
pipenv shell
:Yesterday (before new location) everything was working fine — my python installation did not change.
The text was updated successfully, but these errors were encountered: