Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in initial import #7

Open
orenpapers opened this issue Aug 29, 2019 · 8 comments
Open

Error in initial import #7

orenpapers opened this issue Aug 29, 2019 · 8 comments

Comments

@orenpapers
Copy link

orenpapers commented Aug 29, 2019

Hi,
I downloaded and put the package in site-packages.
When importing, I get the error:


    from regression import HungaBungaRegressor
ModuleNotFoundError: No module named 'regression'
@orenpapers orenpapers changed the title pip install Error in initial import Aug 29, 2019
@JanaMi99
Copy link

JanaMi99 commented Sep 2, 2019

@oren1k Hi, I had the same issue. Just replace from regression import HungaBungaRegressor with from .regression import HungaBungaRegressor in __init__.py. Do the same for all local file imports (classification in __init__.py, core and params in classification.py and regression.py)

@danpol
Copy link

danpol commented Sep 4, 2019

PR #8 should resolve the issue :)

@henaraihan
Copy link

I was getting the same error. Using the above solution, it worked fine but now I am getting another error:
5
C:\Users.....\lib\site-packages\hunga_bunga_init_.py in ()
4 from multiprocessing import cpu_count
5 from sklearn.base import BaseEstimator
----> 6 from regression import HungaBungaRegressor
7 from classification import HungaBungaClassifier
8
C:\Users......\site-packages\hunga_bunga\regression.py in ()
20
21
---> 22 from .core import *
23 from .params import *
24
SystemError: Parent module '' not loaded, cannot perform relative import

@danpol
Copy link

danpol commented Sep 5, 2019

I think you should remove pip version (pip uninstall hunga-bunga) and install the package again from source (python setup.py install).

@alxgal
Copy link

alxgal commented Sep 11, 2019

Hi,
I pulled PR#8 and manually installed hunga_bunga via python setup.py install as described.
However, I still get the ModuleNotFoundError: No module named 'hunga_bunga'
I tried to pip install hunga-bunga again and got the message that the requirements are already satisfied for hunga-bunga.
I now have the file "hunga_bunga-0.1-py3.7.egg" in my python site-packages directory.
Any ideas on how to solve this?
Thanks in advance!

@danpol
Copy link

danpol commented Sep 11, 2019

Ok, I played with this repo a bit—it contains an enormous amount of bugs. I'll close PR#8 not to give hope that it solves all problems :)

@AbdullahKeteldijk
Copy link

You should change the line to:

from hunga_bunga.regression import HungaBungaRegressor

You should repeat that multiple times for all occurrences of that error and you should probably also pip install tabulate.

@kennedykwangari
Copy link

Tried all the options explained above but still facing the same error while importing.

from regression import HungaBungaRegressor

ModuleNotFoundError: No module named 'regression'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants