[Tutor] tflearn

Mats Wichmann mats at wichmann.us
Fri May 22 11:09:43 EDT 2020


On 5/22/20 2:17 AM, Alan Gauld via Tutor wrote:
> On 22/05/2020 01:25, jet pistol wrote:
>> Traceback (most recent call last):
>>   File "c:/Users/Arno/Desktop/Deeplearning/ia.py", line 50, in <module>
>>     import tflearn
> 
> This list is really for querstions about the Python language and its
> standard library so you are more likely to get answers about 3rd party
> packages like tflearn on a dedicated support forum. However...
> 
> 
>>   File "C:\Python38\lib\site-packages\tflearn\__init__.py", line 4, in <module>
>>     from . import config
>>   File "C:\Python38\lib\site-packages\tflearn\config.py", line 5, in <module>
>>     from .variables import variable
>>   File "C:\Python38\lib\site-packages\tflearn\variables.py", line 7, in <module>
>>     from tensorflow.contrib.framework.python.ops import add_arg_scope as contrib_add_arg_scope
>> ModuleNotFoundError: No module named 'tensorflow.contrib'

I wanted to add, and this may be good news or bad news, depending on
your viewpoint, this error is *always* a search path error.

To wit, either
(a) there is no instance of tensorflow.contrib on your system at all -
i.e. there is no path that would ever work, or
(b) tensorflow and its contrib component (in case it's optional - don't
know anything about this package) are installed, but the Python you're
running doesn't know the path to find it.


If the former, install it.
If the latter, make sure the Python you intend to run was used to do the
install.

In either case, if you're running Python directly from a command shell,
use it. Let's say, for discussion, that you use the Python Launcher, so
that you run Python by typing "py":

py -m pip install tensorflow

Instructions _probably_ say to do "pip install" which runs the program
pip, rather than running it as a module of your current Python, and in
modern systems there's quite a good chance you have more than one
version of Python and pip will point to the wrong one.

If you're using Python through a packaged system - Anaconda, say; or an
IDE like PyCharm, then it's usually best to install the wanted package
through that system, so that everything stays consistent.

Hope this helps at least a bit...



More information about the Tutor mailing list