Reputation: 4791
I have Windows 10 (64-bit computer) with Python 2. Here is the output on the cmd >
:
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59)
[MSC v.1500 32 bit (Intel)] on win32
which is visible in C:\Python27
.
In the same folder there is Python 3: C:\Python36-32
.
In my path I have C:\ProgramData\Anaconda2\Scripts
which seems to default to Project Interpreter: 2.7.13 (C:\ProgramData\Anaconda2\python.exe)
.
So after much hair pulling and retrofitting code in Python 3 (you can check my previous posts to get an idea), I get Python 2 up and running.
Only that what I am most interested in is Google's choice of Python for ML - in particular Tensorflow. And, alas, Tensorflow runs on Python 3!
No problem, right? After all I had downloaded and installed it in C:\
... Wrong!
If I go to PyCharms and try installing Tensorflow after selecting Python3, this is what I get:
OK... So I go to the terminal prompt, and try there:
C:\Users\Toni>pip install tensorflow
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
But this may be because I have Python2?
So I go to Google, and find this promising post, which makes me think that going to cmd >
and entering conda install python=3.5.0
will do the trick.
The problem is that if I run this, I am asked to un-install a bunch of stuff that I have painfully gotten to work, for example the autograd
package...
Can I get some help as to how to get to run Tensorflow from this point in Dante's np.inferno?
Upvotes: 0
Views: 642
Reputation: 24581
That is precisely to avoid those conflicts that conda has environments, in which you can install a fresh and separate conda distribution.
In your case, you could start creating an environment (named tensorflow
here, could be anything else) specifically for tensorflow by calling
conda create -n tensorflow python=3.5
then put yourself in the environment with
activate tensorflow
and from there install tensorflow as you mentionned.
I must say that all of this is actually pretty well explained in tensorflow's installation tutorial.
Upvotes: 1