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

"no module named tensorflow" when I "import tensorflow" after I install tensorflow on windows successfully #4912

Closed
DevinCheung opened this Issue Oct 12, 2016 · 12 comments

Comments

Projects
None yet
8 participants
@DevinCheung

DevinCheung commented Oct 12, 2016

I followed ..\tensorflow\contrib\cmake\README to install tensorflow on windows. Everything went well and I installed tensorflow successfully. But after I "activate tensorflow", and tried to "import tensorflow" using python, it went wrong, saying "no module named tensorflow". How can I fix this problem? Many thanks!

@gunan

This comment has been minimized.

Show comment
Hide comment
@gunan

gunan Oct 13, 2016

Member

@mrry might have an answer, but we do not officially have support for windows yet.
Therefore, pip packages built might not be working on windows.

Member

gunan commented Oct 13, 2016

@mrry might have an answer, but we do not officially have support for windows yet.
Therefore, pip packages built might not be working on windows.

@mrry

This comment has been minimized.

Show comment
Hide comment
@mrry

mrry Oct 13, 2016

Contributor

Can you please share the exact commands that you ran between "activating tensorflow" and "importing tensorflow"?

Contributor

mrry commented Oct 13, 2016

Can you please share the exact commands that you ran between "activating tensorflow" and "importing tensorflow"?

@mrry mrry self-assigned this Oct 13, 2016

@DevinCheung

This comment has been minimized.

Show comment
Hide comment
@DevinCheung

DevinCheung Oct 13, 2016

@mrry
I followed the README: "Invoke MSBuild to build TensorFlow", run
'MSBuild /p:Configuration=Release tf_python_build_pip_package.vcxproj on cmd.exe'
And it It compiled.

Then I "activate tensorflow", and open the python.exe.
And I "import tensorflow", it said "no module named tensorflow".

Is there anything that I have missed? Thanks

DevinCheung commented Oct 13, 2016

@mrry
I followed the README: "Invoke MSBuild to build TensorFlow", run
'MSBuild /p:Configuration=Release tf_python_build_pip_package.vcxproj on cmd.exe'
And it It compiled.

Then I "activate tensorflow", and open the python.exe.
And I "import tensorflow", it said "no module named tensorflow".

Is there anything that I have missed? Thanks

@mrry

This comment has been minimized.

Show comment
Hide comment
@mrry

mrry Oct 13, 2016

Contributor

What command do you run to "activate tensorflow"? Is this an Anaconda command?

It sounds like there's a step missing where I'd expect you to install the PIP package. Something like the following (where %TF_PIP_PACKAGE_FILENAME% is replaced with the path to the PIP package that you just built):

C:\...\> pip install %TF_PIP_PACKAGE_FILENAME%
Contributor

mrry commented Oct 13, 2016

What command do you run to "activate tensorflow"? Is this an Anaconda command?

It sounds like there's a step missing where I'd expect you to install the PIP package. Something like the following (where %TF_PIP_PACKAGE_FILENAME% is replaced with the path to the PIP package that you just built):

C:\...\> pip install %TF_PIP_PACKAGE_FILENAME%
@DevinCheung

This comment has been minimized.

Show comment
Hide comment
@DevinCheung

DevinCheung Oct 13, 2016

@mrry
Excuse me, after pip being successfully built, what the next step shall I do? Yes, of course, I use Anaconda.

Thanks for your generous help!

DevinCheung commented Oct 13, 2016

@mrry
Excuse me, after pip being successfully built, what the next step shall I do? Yes, of course, I use Anaconda.

Thanks for your generous help!

@mrry

This comment has been minimized.

Show comment
Hide comment
@mrry

mrry Oct 26, 2016

Contributor

After you run the above pip install command, you should be able to run python and import tensorflow as tf should succeed.

Contributor

mrry commented Oct 26, 2016

After you run the above pip install command, you should be able to run python and import tensorflow as tf should succeed.

@zafartahirov

This comment has been minimized.

Show comment
Hide comment
@zafartahirov

zafartahirov Nov 1, 2016

Contributor

Probably, documentation should be temporarily be changed to "Docker flow" for Windows - at least until pip is fully working on Windows.

Contributor

zafartahirov commented Nov 1, 2016

Probably, documentation should be temporarily be changed to "Docker flow" for Windows - at least until pip is fully working on Windows.

@DevinCheung

This comment has been minimized.

Show comment
Hide comment
@DevinCheung

DevinCheung Nov 7, 2016

hope tensorflow officially supports Windows soon~

DevinCheung commented Nov 7, 2016

hope tensorflow officially supports Windows soon~

@mrry

This comment has been minimized.

Show comment
Hide comment
@mrry

mrry Nov 7, 2016

Contributor

Did you try to pip install the built wheel file, as I suggested here?

Contributor

mrry commented Nov 7, 2016

Did you try to pip install the built wheel file, as I suggested here?

@gunan

This comment has been minimized.

Show comment
Hide comment
@gunan

gunan Nov 7, 2016

Member

You can follow #17 for more updates on windows support. I will close this issue to merge all TF on Windows conversation.

Member

gunan commented Nov 7, 2016

You can follow #17 for more updates on windows support. I will close this issue to merge all TF on Windows conversation.

@gunan gunan closed this Nov 7, 2016

@bhavsarpratik

This comment has been minimized.

Show comment
Hide comment
@bhavsarpratik

bhavsarpratik Mar 25, 2017

Hi, I have laid down step-by-step instructions to successfully install Tensorflow on Windows.

https://github.com/bhavsarpratik/install_Tensorflow_GPU_windows

bhavsarpratik commented Mar 25, 2017

Hi, I have laid down step-by-step instructions to successfully install Tensorflow on Windows.

https://github.com/bhavsarpratik/install_Tensorflow_GPU_windows

@tehmeerali786

This comment has been minimized.

Show comment
Hide comment
@tehmeerali786

tehmeerali786 Apr 13, 2018

Use python 3.5 or less. If Anaconda, you can use one of the three ways here. I used the second one. https://docs.anaconda.com/anaconda/faq#how-do-i-get-the-latest-anaconda-with-python-3-5

tehmeerali786 commented Apr 13, 2018

Use python 3.5 or less. If Anaconda, you can use one of the three ways here. I used the second one. https://docs.anaconda.com/anaconda/faq#how-do-i-get-the-latest-anaconda-with-python-3-5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment