ImportError: No module named setuptools - python

I am trying to import urllib.request on python, but when I try to do so, i get the following error: ImportError: No module named setuptools.
I tried doing 'sudo apt-get install -y python-setuptools' , but after doing so too I am getting the same error.
I am using PyCharm and my Python version is Python 2.7.12+.

Unless there is any specific requirement to use urllib. I suggest you use python-requests. Both do the same.

Related

Pycharm not finding module installed (dnspython) in venv [duplicate]

I want to check MX-Record from Python. So I installed the dnspython package, but when I try to import following library:
import dns.resolver
It shows the following error:
ModuleNotFoundError: No module named 'dns'.
I use PyCharm and Python 3.
You should install https://github.com/rthalley/dnspython first
pip install dnspython

No module named 'bcolors' although 'Requirement already satisfied'

I am trying to use bcolors in my python code in Spyder/Anaconda but it keeps telling me
ModuleNotFoundError: No module named 'bcolors'.
So I installed it with pip install bcolorswhich gave me Requirement already satisfied: bcolors in e:\anaconda3\lib\site-packages (1.0.4), but it still doesn't work.
What am I doing wrong?
You had that error because you are in different interpreter trying to import the module. You should append the path of the module to your working directory.
import sys
sys.path.append("\anaconda3\lib\site-packages")
import bcolors
Try to install lower version of this module
pip install bcolors==1.0.2
Have you tried installing the pandas' library using pip install pandas
I was having trouble with the latest distribution as well. Installing 1.0.2 worked for me.

How to install the binarySearch module?

I need a module, do you know how I can get it?
Currently getting this error code:
File "C:\Users\b\OneDrive\Desktop\Analyse\test_binarySearch.py", line 10, in <module>
import binarySearch as BS
ModuleNotFoundError: No module named 'binarySearch'
If you have pip installed, you can install binary-search by running the following command:
pip install binary-search
(If you do not have pip installed, refer to the documentation for installation instructions.)
Then you can import the library in your code like this:
import binary_search
Open up cmd and type :
pip install binary-search

How to use DNS resolver in Python 3?

I want to check MX-Record from Python. So I installed the dnspython package, but when I try to import following library:
import dns.resolver
It shows the following error:
ModuleNotFoundError: No module named 'dns'.
I use PyCharm and Python 3.
You should install https://github.com/rthalley/dnspython first
pip install dnspython

Prosodylab Aligner

Can someone that uses this tool give me a step by step manual. while I follow the available youtube manual and others on the Github I have still problems. when I want to run aligner.py I have the error
from utilities import opts2cfg, mkdir_p, \
File "/home/mary/Desktop/htk/Prosodylab-Aligner/aligner/utilities.py", line 8, in <module>
import yaml
ImportError: No module named 'yaml'
Is there any way to fix it? I try to install yaml but it seems impossible
The module should be install as pyaml. You can use pip to install Python packages. In your case this will be your installation command.
pip install pyaml

Categories

Resources