Tensorflow: No module named tensorflow.python - python

When importing keras into Spyder, I am receiving an error message
ModuleNotFoundError: No module named 'tensorflow.python'
I followed the instruction on Tensorflow page to install it, however it is not working. When importing Tensorflow only, I do not have any error message.
Details about my versions:
Python 3.6.1 |Anaconda custom (64-bit)| (default, May 11 2017, 13:25:24) [MSC v.1900 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 5.3.0 -- An enhanced Interactive Python.
Thank you for any suggestions!

Related

ModuleNotFoundError: No module named 'tqdm'

Can not run my awesome.py cause:
ModuleNotFoundError: No module named 'tqdm'
(incaelum) C:\Users\inc\Desktop\pruebas\STR_SEARCH>python
Python 3.5.6 |Anaconda, Inc.| (default, Aug 26 2018, 16:05:27) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tqdm
>>>
As u can see i can run python and import tqdm with no errors
I used pip, pip3, conda to install tqdm inside my envoriment:
installation suscesful
I also installed tqdm from anaconda environment manager. no errors as well
but when i run the program i get always the same:
ModuleNotFoundError: No module named 'tqdm'
Am running the py file from my envoriment and getting same error.
Anyone can deal with this?

Tensorflow importing crashes Python without any error on Windows

Yesterday I was trying to solve matplotlib problems on Windows, which included solving from matplotlib import ft2font error. I have added HDF5_DISABLE_VERSION_CHECK=2 for that. But today I found, that tensorflow doesn't work anymore:
> python
Python 3.5.5 |Anaconda, Inc.| (default, Apr 7 2018, 04:52:34) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>
It thinks 30 seconds, then exits Python without any error.
Where can I see logs or crashdumps or something?
If you try import h5py, and get ImportError: DLL load failed, you probably have some problem as mine. Try:
Uninstall h5py via anaconda navigator, some relative libs (tensorflow) will be uninstalled as well.
Go VM path in anaconda installation, D:\Anaconda\envs\YOUR_VM\Lib\site-packages, delete h5py and h5py-2.8.0-py3.6.egg-info folders
Reinstall tensorflow or tensorflow-gpu

TensorFlow on Windows 10: “not a supported wheel on this platform” error

I was following the guide steps until get the "not a supported wheel on this platform" error. I checked the Anaconda is properly installed with the following version information:
Python 3.6.0 |Anaconda 4.3.0 (64-bit)| (default, Dec 23 2016, 11:57:13) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anyone know how to solve this?
I think it's only available for Python 3.5.x not 3.6.
You can quickly create a 3.5 environment with conda create -n tensorflow python=3.5

If I change the folder, why is the "ModuleNotFouldError" happened?

My environment is Windows10, and I installed python3.6, tensorflow, and anaconda.
There is no error in the installation.
If I run the "command prompt" (not use anaconda), I can success to run tensorflow.
However, if I use anaconda, a problem is coming.
1st: If I run anaconda prompt and import tensorflow by python, no problem.
2nd: If I change the folder and import tensorflow, the error message "ModuleNotFouldError" is coming.
Why I change the path, I cannot import a module?
History is below.
(c:\Users\**Username**\Anaconda3) c:\Users\**Username**\>python
Python 3.6.0 |Anaconda 4.3.0 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits", or "license" for more information
>>>import tensorflow
>>>exit()
(c:\Users\**Username**\Anaconda3) c:\Users\**Username**\>cd workspace
(c:\Users\**Username**\Anaconda3) c:\Users\**Username**\workspace>python
Python 3.6.0 |Anaconda 4.3.0 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC 1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits", or "license" for more information
>>>import tensorflow
Trackback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'tensorflow'

Global Python package

so I have this package. In the cmd I go to hp#HP-PC C:\Users\hp\Documents\scripts:
hp#HP-PC C:\Users\hp\Documents\scripts
> python
Python 3.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import toolzz.printer as t
>>> t.printz()
5
Everything is working fine but I want to have a directory in which I could add my scripts and be able to open my cmd->python->import my package and do whatever I am going to do and not get this instead:
hp#HP-PC C:\Users\hp
> python
Python 3.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import toolzz
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'toolzz'
>>>
PS: keep in mind I have added the directory scripts to the path and I have global bat files which work
Run
python -m site
It'll list 2 important pieces of information:
The Python module search path, sys.path
The location for the USER_SITE directory, and wether or not this exists.
Python looks for modules along those locations. Put your module in a sys.path location (in one that ends in site-packages preferably), or make sure you created the USER_SITE directory and put your code in there.
And you can always extend the path by setting the PYTHONPATH environment variable.

Categories