Using conda to create virtual environment, I get t

2019-07-23 09:16发布

问题:

I need a virtual environment with Python 3.5, so I can run some tensorflow projects (tensorflow doesn't work on Python 3.6, which I normally use). I use conda because (as you'll see) I'm so bad at unix/understanding my computer.

I type in

conda create -n myenv python=3.5

and then

activate myenv

and then, to check, Python version,

python -V

The reply is Python 3.6 which is not the one I want.

Looking at this question, it seems like I need to install Python 3.5 outside of the virtual environment in order to call it, but how do I do that without messing with my installation of Python 3.6?

I get that this is a basic question but I'm terrible at computers and would be so grateful for any replies. Talk to me like I'm a child bc that's basically the level I'm on.

回答1:

I finally figured out what was wrong (sort of) by looking at this question. If i typed in

cd ..

to go one step up in the folder struction, and then checked my Python version, I had the right version (Python 3.5). From there I could install tensorflow and it was imported to python without problem. I have no idea why, but it works so I can't complain.