ModuleNotFoundError: No module named 'term' - python

What is wrong here? I have python 3.8 but keep getting the error message above when I try importing 'colored' from the termcolor library. What should I try? Thank you.

because it is not installed into anakonda's dependencies . (You may installed them into another Python dependencies).
at first determine where your python is located
import sys
sys.executable
you will gain something like '/Users/some_user/opt/anaconda3/bin/python'
Then go to this direction
cd /Users/some_user/opt/anaconda3/bin/python
and install missing package
./pip install term

Related

Module importation error on Python 3.8.3; No module named 'tensorflow_docs'

I have been trying for fews days to follow this deep learning tutorial, https://www.tensorflow.org/tutorials/keras/regression
But I can't find a way to import tensorflow_docs, I did try this
https://stackoverflow.com/questions/55535518/modulenotfounderror-no-module-named-tensorflow-docs-when-creating-tensorflow
pip install git+https://github.com/tensorflow/docs
But I still get this error
ModuleNotFoundError: No module named 'tensorflow_docs'
I am running Python 3.8.3, through Pycharm.
Thank for your help.
tensorflow_docs was indeed in my computer but python was not looking at the directory,
I simply add
import sys sys.path.append("C:/users/xxxx/appdata/local/programs/python/python38/lib/site-packages")

ModuleNotFoundError: No module named 'zipfile' when using pip

I'm new to Python and I have installed multiple versions (Anaconda3 and Python 3.7.4) on my Mac.
My pip is not working. When I run any pip command, everything appears to be importing properly. But it gets the last line, import zipfile, and I get the message:
ModuleNotFoundError: No module named 'zipfile'
I have been Googling for hours and I can't seem to find a solution.
My Python now lives in the Anaconda directory /users/NAME/opt/anaconda3/.
Ultimately, I would like to start from scratch and just reinstall Python 3.7.4 again, so it's all nice and clean. I can't uninstall Anaconda because I get the same ModuleNotFoundError: No module named 'zipfile'.
I have also tried to install the module zipfile and that doesn't work either.
Can someone help?
Thanks
Thanks everyone for your help so far. I am really new to Python, so I don't think I explained myself properly.
UPDATE: I think I have fixed my problem. Pip was looking for the file zipfile, so I downloaded https://pypi.org/project/zipfile36/#files and changed the name of zipfile36.py to zipfile.py.
Seems like it did the trick.

Downloaded package ImportError

I have recently installed python 2.17.14 to use a package which I installed in the command prompt with:
python -m pip install packageName
However, whenever I try to use it with a script provided by the package authors, I get Import Errors:
ImportError: cannot import X from YX
ImportError: attempted relative import with no known parent package.
I don't know what I'm doing wrong, as I am really new to Python. Does anyone have any ideas?
The package is called neurodesign and I downloaded the try out script from the official website "neuropowertools.org"
Best,
Max
In case anyone (who is also new to python^^) fails ridiculously at this task as well: I had to manually install all the modules used within this package for it to work as they weren't installed automatically.

How can I install pythonds module?

when I run a programme containing:-
from pythonds.basic.stack import Stack
it says:-
ImportError: No module named pythonds.basic.stack
Please help me out.
pip install pythonds.
And then from pythonds.basic.stack import Stack. Note that it's Stack, not stack.
If you don't have the Python PATH variable configured, then type this into your command prompt:
C:\Python34\Scripts\pip install LIBRARY NAME
This path is only and example. change it wherever you have Python in your pc.

Python ImportError - Custom Module

I have installed a custom module (Twilio) using PIP, but when I try to import it, it will bring up:
ImportError: No module named 'twilio'
I'm running Windows 10 and Python 3.5. What am I missing? It seems to be an error with the paths. If it is, how do I set the paths?
Edit: I have my PYTHONHOME set to C:\Python33 and my PYTHONPATH set to C:Python33\Lib
First of all you need to check your package location.
pip show custom_package
Then check the system paths by
import sys
sys.path
If you dont' see your package path here, you can add it.
sys.path.append(custom_package_path)
If this doesn't work try reinstalling it. Or you can also install it with easy_install

Categories