-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
bootstrap -> No module named pip #656
Comments
btw. it works with python3:
Some more info:
|
btw. i have python-pip and python-pip3 installed. Both are: 1.5.4-1 and the package python-virtualenv 1.11.4-1 was installed. I have removed all pip/virtualenv packages and re-try again my test-bootstrap. Now it will fail with python2 and python3 with the same error. |
I created a fresh new venv with python3 and installed pip and virtualenv from github:
...and recreate the bootstrap script and try it: Same "No module named pip" error. |
Looks like your bootstrap script doesn't have the necessary virtualenv_support directory alongside it. |
Can you explain a little bit more, what you mean? My script is not really more, than from the docu here: https://virtualenv.pypa.io/en/latest/virtualenv.html#bootstrap-example |
When you create a bootstrap script, it is essentially just a customised version of So, wherever your bootstrap script is located, you need to create a directory called |
Ah! Thanks for the Information! That's really boring. So a single bootstrap file is a little bit useless, if other files must be downloaded before :( Was that always been so? EDIT: Seems that #632 is a similar request for a self contained virtualenv.py... btw. i think the error message is not really good. Maybe a simple solution like the following is more helpfull, e.g.: :
EDIT2: The "node: pip is needed" should be added in the https://virtualenv.pypa.io/en/latest/virtualenv.html#creating-your-own-bootstrap-scripts section, too. |
It's been that way for a long while. virtualenv used to download pip and setuptools from the internet, but that was potentially insecure, often very slow, and unreliable (your internet goes down and you can't create virtualenvs). The change was deliberate, and while it does remove the "single file application" option, we viewed it as worth the cost. |
What's about to include pip into virtualenv.py? Or maybe better a separate "bootstrap" project, that's put everything together in one file? |
I've been through this thought process a long time ago :-) We use the pip wheel to install itself and setuptools. To do that we add the pip wheel to sys.path, using the fact that wheel files are actually zip files that can be added to sys.path (with some limitations, that don't apply here). Embedding the pip wheel into virtualenv wouldn't allow that. Sorry... |
One Question: It also doesn't work if pip is systemwide installed, isn't it? On creating i see this:
So my added info ( jedie/PyLucid@dd3b5db ) is simply wrong :( I really must have setuptools and pip as sdist ? The a installation will result in this:
That much to do, isn't it? One reason to remove the functionality was that it's
I'm wrong? |
setuptools and pip as wheels not sdists, but yes. You manually download over https (which is secure). The previous implementation used http (which is not). And why not just use the |
http is not secure, yes. But IMHO a better solution would be to add hashes and compare that, like the solution from #632 (comment) then it's euqal if https or http is used. (https is also not secure, if the server was hacked and the files are replaced ;) )
Seems that i understand this not right. There is a way to skip the wheel downloads? It's only a simply name of a directory, which can contain the wheels... So how can this help here?!?! Yes, i can bundle my bootstrap + the virtualenv_support directory with the wheel files in a archive... Is that what you mean? |
What are you trying to do? The following works:
You don't put them in an archive, you have them as separate files. There is no single-file solution, if that's what you want, sorry. |
Yes, i understand that... But my usecase is this: A user would like to install PyLucid CMS. In the past he must only do that:
see: http://www.pylucid.org/permalink/333/1-create-a-pylucid-environment-with-pylucid-boot#bootstrapping This doesn't work since virtualenv v1.10 :( Now the user must also have This is far away from, just "wget and run" :(
Yes that is what i want. I requested this here: pypa/packaging-problems#55 Maybe i will include the complete "get_pip.py" in my bootstrap... i'm working on a proof of concept... |
Run into the same problem. =/ Looks complicated and overengineered/overhacked. |
I am ready to deploy my own installer if that stuff - https://bitbucket.org/pypa/wheel/issue/111/how-to-install-wheel-manually - is clarified. |
This exception definitely need a better error message. |
My solution is https://github.com/jedie/bootstrap_env to create a complete self contained virtualenv bootstrap file by enbed 'get-pip.py' ;) But yes, a better error message would be good. |
BTW you can create a virtualenv WITHOUT pip or setuptools, in which case virtualenv won't complain about them not being around. Use the But in practice you should be able to run this, then run a local You also don't specifically need a directory called |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Just add a comment if you want to keep it open. Thank you for your contributions. |
I created a minimal bootstrap with virtualenv v1.11.6
A run results in this:
All files are here: https://gist.github.com/jedie/4bc671239b8959376d4b
more info:
Maybe it's related to pypa/pip#1918 ?
The text was updated successfully, but these errors were encountered: