-
Notifications
You must be signed in to change notification settings - Fork 3.1k
pip install
to automatically create virtualenv and install from requirements.txt
#2488
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
Comments
It sounds a bit too magical to me and trying to guess what the user intended. Maybe the user didn't want a virtualenv -- or if they did, for what version of Python and what would it be called?
And it was just discussed that we want to allow |
Well, you know what Arthur Clarke says :)
Regarding the version, I'd say it should use whatever version of Python is driving the pip cli. The users who care about these details could still create virtualenv manually the normal way. |
Equivalent to |
+1! I was literally discussing my hopes for this potential feature in
I am not sure if this has been discussed before, however I was also hoping for something more detailed than
My biggest complaint when developing Python applications is using I had a lot of headaches when my dev team had upgraded their server from Python 2.7.x to Python 3.x and not being on the Python dev team I had some struggles. When I went to test it out, I spent quite some time learning about I would be very interested in contributing and developing out this feature request, if there is interest. Before I develop anything, I would like to make sure that the Thank you!
@msabramo why would a user not want a |
Could we use the pip config file to store whether or not the user desired this behaviour? See https://pip.pypa.io/en/stable/user_guide.html#config-file |
Folks might be interested in http://platter.pocoo.org/dev/ as it creates a tarball with a bunch of wheels and a script that creates a virtualenv and installs the wheels. |
+1 for the idea of the convention name of the requirements file and installation when doing 'pip install'. |
I think the configuration format should NOT be .json, since it doesn't allow comments. IMHO it's the largest downside of e.g. |
Hello all. Any new ideas on the last 2 years about this? I ended here only today, when searching for recommendations about req file and also dev-req file. Basically, the way NPM handles this is PERFECT IMHO. There can be:
So, my dream is:
This would allow all dependencies to be installed for development purposes, and for deployment (which is usually scripted) you just get rid of dev deps by a --production_only-like flag. Any comments? |
This is something that the pipfile format is intended to bring: https://github.com/pypa/pipfile. |
Closing as a duplicate of #1795. |
Virtual environment support is part of the Python standard library and "is now recommended for creating virtual environments" since Python 3.5. Interestingly, Let's pretend there are no Python versions around that still need to install virtualenv, then it should be natural to assume that making And while Pipenv does a good job for local development, it's still a separate tool you have to install unnecessarily just for deploying your dependencies, and it forces you to have a virtual environment (which is unnatural and cumbersome for, e.g., Docker-based deployments -- opinions may vary). There really shouldn't be ranting about whether or why Pipenv is an officially recommended tool, but rather the essential features and workflows Pipenv is demonstrating should be integrated into |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Don't know if this was asked somewhere already, but wouldn't it be nice if doing a simple
would automatically install from ./requirements.txt and in case the command was refused due to missing
sudo
privileges (i.e. attempting to install into the system Python site-packages) automatically creates a venv in the current directory (now that we havepython -m venv
in Python 3) and installs the packages in there. For beginners, this would literally allow installing just the Python 3 interpreter, getting the source code of an application and then installing the dependencies in one command, without having to know any virtualenv stuff in their first encounter with Python.Having been involved in several beginner Python workshop events as a coach, I think something like this would be a pretty neat feature.
Similar behaviour that is available as
npm install
for Node apps seems pretty handy to me, when I just fetch some app source and have it ready for launching after issuing a single command.What do you think?
The text was updated successfully, but these errors were encountered: