Reputation: 705
I have Python tools for visual studio 2017. I want to install tensorflow. I have already installed it using CMD with this command
pip3 install --upgrade tensorflow
And the window said the installation as successful. However when I try to use tensorflow in a Python project in VS - the module is not found. What am I doing wrong here?
I found this menu in the solution to install python packages but none of them work for tensorflow and give me this error:
----- Installing 'tensorflow==1.0.1' -----
Collecting tensorflow==1.0.1
Could not find a version that satisfies the requirement tensorflow==1.0.1 (from versions: )
No matching distribution found for tensorflow==1.0.1
----- Failed to install 'tensorflow==1.0.1' -----
Upvotes: 1
Views: 7850
Reputation: 2762
The probably easiest way to do it is to first install VS 2017 Preview without Anaconda (uncheck the relevant checkbox before installation).
Then separately install Anaconda 4.2.0, which will bring you Python 3.5.2, on top of which you can install TensorFlow.
Make sure to set as default the new environment "Anaconda 4.2.0" which will appear in the Python Environments tab. Also you will need to hit the refresh button for the new environment - this will bring the syntax highlight to your project. Note, the refresh may take a few minutes.
Upvotes: 1
Reputation: 705
I figured it out. Tensorflow is not supported for the Python 3.6 environment.
Upvotes: 4