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
venv creation inconsistency with video #2
Comments
Hi, That is funky. I have never seen that error. What version of Python 3 are you running? Is it possible you have an old one which does not have pip or are running on Linux with a limited install without pip? In terms of location, I always do it in what will be the top level folder in PyCharm. That way it autodetects it and saves me a step. But this is not required. Just need to activate it via the CLI or register it in PyCharm and it can be anywhere. Best, |
I got the same error as @gtmaskall, but his fix worked for me as well |
That is odd. @ianmonat what happens if you run `python3 -m pip list'? I'm wondering if pip is missing from that install for some reason (not the env but the original one used to create the env). |
This is the output from python3 -m pip list
|
Hi guys. I don't think the copies is the issue. I think it's pip and a version mismatch. Have a look at this issue: In particular, near the bottom:
Does that help? |
Hi Michael, Thanks for your time! Following my nose I think it's less of a version mismatch and more of a distro mismatch. I have a data science background and anaconda is a popular distro for data science. I can do pandas etc but was wanting to develop my python with more developer stuff (such as mongodb). I think a key related issue is actually this one. Particularly, note ensurepip wasn't bundled with the anaconda dist. A user there seemed to update his python from 3.6.2 to 3.6.3 (screenshot) and then had ensurepip. I'm going to hazard that anaconda added ensurepip for python 3.6.3. I did
Now I hope I can continue with your mongodb course! It was interesting to see the distro bundling discussion earlier in that thread. I'm sure such subtleties of python distros and virtual environments (venv vs conda) etc will bite me yet more times ahead! Perhaps a topic for an excellent podcast. ;-) Cheers, |
I got this error msg when trying to install python3.6-venv, am I doing something wrong?
|
Ian, The fact that you say the --without-pip option worked for you, makes me think it's the ensurepip issue and that you're probably using anaconda? If you are and still <= 3.6.2 then run the above update and that should resolve it. If not, then perhaps worth opening a new issue? Guy |
Does this answer your question? If I'm hearing you right, if I upgrade my version of python it should solve? Is this done on the cmd line or new download at python.org? |
Okay, cool. Yes, so you're running an Anaconda distro and your python is version 3.6.1 so if you run Regards, |
Thanks Guy - i ran the update...
...deleted the project, re-cloned it, and got back to the point in the course where I had to stop previously, the point in which I actually opened a new issue about the missing image....
....not sure this course is for me, will try a MongoDB University beginner course that opened up today and and maybe try again later... |
Hi Ian, I'm going to close this issue now, but if you get up to python 3.6.4, get the specific error I started with above (despite python version 3.6.4), then do re-open this. I think it's most helpful to others to keep this issue pertinent to the lack of ensurepip in conda's python prior to 3.6.3. I see your other issue and I'll drop you a reply in there with a couple of links that may be useful to you. I think your issue revolves around the discrepancy between "stock" python and anaconda's distribution; there are frequent comments that pip and virtual environments are not necessarily equivalent/compatible between the two. I assure you I am no expert. Part of my motivation is to expand from "just" using python for data science analysis and pick up more "development" such as accessing mongodb and using virtual environments. Thus, despite warnings/caveats from others on the Internet about subtle discrepancies when mixing conda and pip, with python 3.6.4 I'm now able to follow on with Michael's course, which is really the main criterion here rather than making a robust piece of software that doesn't break with some change to pip or conda! I'd tentatively suggest you spend a little time familiarising yourself with your python install (e.g. I think compare Mac homebrew python with conda and pick which you want to use?) as I think that will stand you in good stead for any courses. Regards, |
Thanks for all the help and ideas @gtmaskall. @ianmonat if you are still having trouble, consider just using python3 -m venv with the straight up Python 3. The dependencies should install OK. Best, |
Hi Mike,
Just starting to work through this after hearing about it on your podcast. The recent move of the requirements.txt file to the src directory creates a mismatch with the video. The student is left wondering whether to run the
python -m venv
command in snake_bnb or in the src subdirectory (where the requirements.txt is now). Well, I wondered.Also I'm using an anaconda python3 dist, and I got
What worked for me was
python3 -m venv --without-pip .env --copies
This created the .env directory in snake_bnb alongside src. Hope this is as intended.
The text was updated successfully, but these errors were encountered: