Skip to content
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
Assignees

Comments

@DevinCheung
Copy link

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
Copy link
Contributor

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
Copy link
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
@mrry mrry added the stat:awaiting response Status - Awaiting response from author label Oct 13, 2016
@DevinCheung
Copy link
Author

@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
Copy link
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
Copy link
Author

@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!

@jart jart removed the stat:awaiting response Status - Awaiting response from author label Oct 15, 2016
@mrry
Copy link
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.

@z-a-f
Copy link
Contributor

z-a-f 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.

@mrry mrry added the stat:awaiting response Status - Awaiting response from author label Nov 2, 2016
@DevinCheung DevinCheung reopened this Nov 7, 2016
@DevinCheung
Copy link
Author

hope tensorflow officially supports Windows soon~

@mrry
Copy link
Contributor

mrry commented Nov 7, 2016

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

@aselle aselle removed the stat:awaiting response Status - Awaiting response from author label Nov 7, 2016
@gunan
Copy link
Contributor

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 as completed Nov 7, 2016
@bhavsarpratik
Copy link

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

https://github.com/bhavsarpratik/install_Tensorflow_GPU_windows

@tehmeerali786
Copy link

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

copybara-service bot pushed a commit that referenced this issue Aug 11, 2023
Imported from GitHub PR openxla/xla#4912

patch for this PR openxla/xla#4894 (comment)

@akuegel @ezhulenev Thanks in advance!
Copybara import of the project:

--
27fe0e2e859b5188704f21613283e68d594f4d92 by Chao Chen <cchen104@amd.com>:

rocm graph adds GraphAddKernelNode()

Merging this change closes #4912

PiperOrigin-RevId: 556107848
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants