Jupyter Notebook : ModuleNotFoundError: No module named 'sqlalchemy' - python

I have installed sqlalchemy and its getting imported in python in powershell
But when I am trying to import in jupyter notebook, its showing module not found error.
I tried installing it in the notebook and then importing it but no success
I am really stuck. Any help will be appreciated.
Thanks in advance.

A bit of a guess but maybe you need to reopen the notebook after installing - python does not reload its installations before you do it.

I got the solution from this post
"ImportError: No module named" when trying to run Python script
I had to add the path of the module folder to sys.
import sys
sys.path.append('my/path/to/module/folder')
import sqlalchemy

Related

Python 3 How to resolve No module named '_win32com' error?

I'm using Python 3 and working in Pycharm.
I was able to get pywin32 and win32com working on one project, but since I have tried importing them into a new project, they don't seem to be working. At first I was getting No module named 'win32api', but I updated the win32com\__init__.py from import win32api to from win32 import win32api. That seems to have fixed the initial error, but now I'm getting No module named '_win32com'. This seems to be from issues with \pythoncom\__init__.py maybe?
I've tried uninstalling and reinstalling pywin32 and pypiwin32 as well.
Example of code here:
import win32com.client as win32
xlapp = win32.DispatchEx("Excel.Application")
wbe = xlapp.workbooks.open(r"C:\Users\me\example.xlsx")
I decided to try again with a new project and install the packages globally and that has fixed the issue. Still not sure why it wasn't working when installing locally, but using global installs seems to be good solution.

from freegames import square,vector ModuleNotFoundError: No module named 'freegames'

I have been getting this error ever since i started to import freegames module in mine python file please help needed. I have installed freegames and pygame module (i guess) but
when i try to install i get this peculiar erroenter image description here
please help
Have you installed the module? If not, you can do it by writing pip install freegames. https://pypi.org/project/freegames/

No module named 'nets'

I'm running an object detection code and still getting this error"
ModuleNotFoundError: No module named 'nets'
Do you have any suggestions to resolve it?
first of all try this to make sure that you have installed the following package in your environment:
import pip
pip.main(["install","nets"])
then if you get errors it maybe the bug sometimes you may face and check my question module dectection in spyder which says reinstalling with spyder os installer sometimes works.

ModuleNotFoundError: No module named 'pandas' in RStudio

I am trying to get my python work in RStudio version 1.4. I cannot run any code python script within RStudio.
For example I run:
import pandas as pd
And get error such as:
ModuleNotFoundError: No module named 'pandas'
I went into Tool -> Global Options and set up my Python environment to the latest version.
Can someone help me with this? It must be within RStudio IDE.

opsgenie-sdk modeule import error

I am trying write a python program to use the Opsgenie API's to pull some reports.
I installed the https://github.com/opsgenie/opsgenie-python-sdk
When i run my program i get the error message
"from opsgenie.alert.requests import ListAlertsRequest
ImportError: No module named requests"
The module is present in the site packages folder and I also added the path to the folder to PYTHONPATH.
It happened for multople module I am not sure if the dependencies work on the opsgenie-sdk.
Has anyone had this issue?
Help appreciated.

Categories

Resources