ModuleNotFoundError: No module named 'tqdm' - python

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?

Related

Import package doesn't work in venv, when executing with python.exe

I'm installing package whl with pip in virtual enviorment.
PS C:\Users\Project> .\venv37\Scripts\activate
(venv37) PS C:\Users\Project> pip install .\vtk-9.0.1-cp37-cp37m-win_amd64.whl
Processing c:\users\project\vtk-9.0.1-cp37-cp37m-win_amd64.whl
Installing collected packages: vtk
Successfully installed vtk-9.0.1
and import works.
(venv37) PS C:\Users\Project> python
Python 3.7.4 (default, Aug 9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Warning:
This Python interpreter is in a conda environment, but the environment has
not been activated. Libraries may fail to load. To activate this environment
please see https://conda.io/activation
Type "help", "copyright", "credits" or "license" for more information.
>>> import vtk
>>> exit()
(venv37) PS C:\Users\Project> deactivate
Now I try to execute it from Python Interpreter in venv.
PS C:\Users\Project> .\venv37\Scripts\activate
(venv37) PS C:\Users\Project> .\venv37\Scripts\python.exe
Python 3.7.8 (tags/v3.7.8:4b47a5b6ba, Jun 28 2020, 08:53:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import vtk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'vtk'
>>>
And it doesn't work. What is my mistake?

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: No module named tensorflow.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!

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