ModuleNotFoundError: No module named 'github' - python

trying to import github (PyGithub) but it keeps giving the same error, even though the lib is fully installed.
Code:
from github import Github
Output:
Traceback (most recent call last):
File "...path", line 1, in <module>
from github import Github
ModuleNotFoundError: No module named 'github'
Anyone know how to fix this issue?

This will install the package.
pip3 install PyGithub
If you're getting the same error that could be due to circular imports. Rename if you have any .py files named "github.py" in your work folder.

Related

No module named 'win32.com', But I have install it. How?

I've got a problem regarding the excel2img module library that is about 'win32com'.
I've check the solutions at link follows:
https://superuser.com/questions/609447/how-to-install-the-win32com-python-library
Still getting an error "ImportError: No module named win32com.client" after installing pywin32 lib
ImportError: No module named win32com.client
However, the error still there.
'''Traceback (most recent call last):
File "C:/Users/Lenovo/PycharmProjects/HO_P1/excelToImage.py", line 4, in
import excel2img
File "C:\Users\Lenovo\PycharmProjects\HO_P1\venv\lib\site-packages\excel2img_init_.py", line 1, in
from .excel2img import export_img
File "C:\Users\Lenovo\PycharmProjects\HO_P1\venv\lib\site-packages\excel2img\excel2img.py", line 18, in
import win32com.client
File "C:\Users\Lenovo\PycharmProjects\HO_P1\venv\lib\site-packages\win32com_init_.py", line 1, in
from win32.com import *
ModuleNotFoundError: No module named 'win32.com'
'''
image shows that I've install the module
Can anyone give me a suggestion to solve this problem?
Did you accidentally misspell the module name?
It's
from win32com import *
Not
from win32.com import *
you maybe installed more lib than you really need and the additional lib creates this reference error
try to only keep pywin32 and uninstall other lib with win32 in the name

Pyp3 gives ModuleNotFoundError even if packaged is install

So I'm trying to figure out if I can speed up my code. For that purpose I installed pyp3. But when I try to run the python file using pyp3 I get error in the first line itself ModuleNotFoundError, But when I use simple python my code works smoothly. Is it due to python version difference ? I'm new to pyp3. Any suggestion/help would be appreciated. Thankyou
pypy3 main_feature_extraction.py
Traceback (most recent call last):
File "main_feature_extraction.py", line 1, in <module>
from dotenv import find_dotenv, load_dotenv
ModuleNotFoundError: No module named 'dotenv'

ModuleNotFoundError: No module named 'pandas' in Pycharm

import pandas as pd
while running this code I have the following error.
C:\Users\user3\PycharmProjects\Customer_Revieww\venv\Scripts\python.exe C:/Users/user3/PycharmProjects/Customer_Revieww/venv/cust_rev.py
Traceback (most recent call last):
File "C:/Users/user3/PycharmProjects/Customer_Revieww/venv/cust_rev.py", line 1, in <module>
import pandas
ModuleNotFoundError: No module named 'pandas'
please provide solution.
Thank you in advance
You need to instal the module in the environment you are using in PyCharm.
This can be done from command line:
pip install pandas
As well as in PyCharm itself - see this video.

Python - ModuleNotFoundError: No module named 'pyown'

so i'm making my first telegram bot, and when compiling code in ConEmu I got this error:
Traceback (most recent call last):
File "echobot.py", line 1, in <module>
import pyown
ModuleNotFoundError: No module named 'pyown'
help me please.
import pyown
ModuleNotFoundError: No module named 'pyown'
Are you sure that the library is called pyown, not pyowm?
https://pypi.org/project/pyowm/
It can't find pyown library. Install this library first, either to your working folder's library folder or install it globally. Then import pyown library on your py file. Then write rest of the codes.

sompy Module Import Error

I can't import the sompy module even though I installed it successfully, and it appears in the modules list of my python environment:
When I try to import the sompy module using the following statement:
import sompy
I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'sompy'
What's wrong?
Which interpreter/IDE are you using? If using PyCharm, the problem could be that PyCharm hasn't identified a root folder for your .py project.
I would try and recreate the root folder as a subfolder and right click > Make source directory.

Categories

Resources