ModuleNotFoundError: No module named 'statsmodels.miscmodels.ordinal_model' - python

I want to build a Ordered Probit model using statsmodel package in python. Used the following code to import:
from statsmodels.miscmodels.ordinal_model import OrderedModel
but getting a following error:
ModuleNotFoundError: No module named 'statsmodels.miscmodels.ordinal_model'
I have updated the package as well but the error persists.

well,u can install this package in this way:
pip install git+https://github.com/statsmodels/statsmodels

pip install --upgrade --no-deps statsmodels worked for me.

I know it is a pretty old discussion board, but I hope my post can be helpful.
I recently ran into the same issue. and solved by doing the following:
pip3 install git+https://github.com/statsmodels/statsmodels. Just like #AudiR8 mentioned. However, if you are using an IDE with python version 3.0 +, use pip3 is better.
Make sure the package is installed in the correct directory then turn off the IDE.
Reopen it and it should be working.
Hope it can be helpful!

An option that helped me was to restore my console's settings to default and then it worked. My IDE in particular was Spyder

You can try use this instead from statsmodels.discrete.discrete_model import OrderedModel

Related

Failure to import python package 'primers'

I think I'm having a simple import command problem, or possibly a permissions problem?
I installed the package "primers" with pip3 install primers as per the docs here
It's definitely installed, because it runs in the CLI
but in python, the command from primers import primers results in the error
"ModuleNotFoundError: No module named 'primers'"
which python and which primers point to adjacent locations in bin/
so... what should i be trying to try to fix this and import this package? ideas?
Maybe you can check these:
Please make sure you are in the same environment
check if the module is installed in your env: pip3 list
check your default python version.
Use the pip3 uninstall primers command then use pip3 install primers command. Answer me back if you still have a error

how i can i solve no module named can error?

hello i'm using python 3 and ros noetic, and i got this error
import can
ImportError: No module named can
I've got this error before, and I solved it through a very simple can-bus related installation command in google. But I can't find that command now
I've tried all the like $ sudo apt install python3-can.
but I can't fix it at all
thank you................
The problem is, that the module can't be found by your python.
first, try to remove the package with:
pip uninstall python-can
and re-install it with
pip install python-can
In case you have several versions of python installed (such as python2 and python3) make sure, you use
pip3
instead of pip.
Next you can try to manually search your package directories for the package, if it is even there.
Try cloning the library with git and running the setup.py installation, worked for me.

ModuleNotFoundError: No module named 'fpdf'

Getting this error: ModuleNotFoundError: No module named 'fpdf'
I've re-downloaded python, created a new venv and installed fpdf2 using pip install fpdf2, but I still get this error when I run from fpdf import FPDF
python version: 3.10.4
I've looked all over stack overflow and through the github issues and haven't found any solutions, and have no idea what to try next.
firstly please make sure that you want fpdf or fpdf2 lib, these are two different lib.
It seems that you want fpdf, so you need to try:
pip install fpdf
I was using VSCode's Jupyter extension and it wasn't using the same virtual environment that the terminal was using - so the install wasn't going to the right place. Once I aligned the two virtual environments, it worked fine.
This may be silly but should you be using fpdf2 instead of fpdf? Because if that's the name then it needs to be exact.
from fpdf2 import FPDF
Otherwise if you are using an IDE, then you may need to download the package into the IDE. For example in PyCharm I had to go to Python Packages and install it through there even after pip. Probably some path related issue.
Try pip install fpdf
With no 2.
Also make sure you're in the same env.

No module named 'gsdmm'-topic modelling

I have problems to work with GSDMM model of topic modelling dedicated for short text.
I followed this link to install it: https://towardsdatascience.com/gsdmm-topic-modeling-for-social-media-posts-and-reviews-8726489dc52f. but it didn't work. I also installed the model using the following command: pip install GPyM-TM (https://pypi.org/project/GPyM-TM/) but nothing works. I got the following error:
ModuleNotFoundError: No module named 'gsdmm'
any help?
thank you
python3 setup.py install --user
without the "--user", I have a message that says that I do not have write access to this directory and when I add the "--user", the package was installed and it works
I had the same issue, this article about GSDMM helped me to resolve the issue.
need to install GSDMM using pip install git+https://github.com/rwalk/gsdmm.git

ImportError: No module named pythoncom

I am a newbie (just 1 week) to this Python world. I tried installing django-mssql, but when I tried to import the library (using import sqlserver_ado.dbapi), I got this error message:
ImportError: No module named pythoncom
I tried to look for that library without success.
Can you guys point me in the right direction?
You are missing the pythoncom package. It comes with ActivePython but you can get it separately on GitHub (previously on SourceForge) as part of pywin32.
You can also simply use:
pip install pywin32
If you're on windows you probably want the pywin32 library, which includes pythoncom and a whole lot of other stuff that is pretty standard.
You should be using pip to install packages, since it gives you uninstall capabilities.
Also, look into virtualenv. It works well with pip and gives you a sandbox so you can explore new stuff without accidentally hosing your system-wide install.
$ pip3 install pypiwin32
Sometimes using pip3 also works if just pip by itself is not working.
Just go to cmd and install pip install pywin32 pythoncom is part of pywin32 for API window extension....

Categories

Resources