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

ImportError: cannot import name 'Porter' #85

Open
elimsjxr opened this issue Oct 2, 2021 · 2 comments
Open

ImportError: cannot import name 'Porter' #85

elimsjxr opened this issue Oct 2, 2021 · 2 comments
Labels

Comments

@elimsjxr
Copy link

elimsjxr commented Oct 2, 2021

I'm using porter 0.7.4. and scikit-learn 0.20.0 (using conda) and
When I used “from sklearn_porter import Porter”
I got the error:
ImportError: cannot import name 'Porter'
Why about it?

@nok
Copy link
Owner

nok commented May 16, 2022

Hello @elimsjxr , how did you install the package?

Here are some commands to check your environment:

conda run -n your_env python -m pip freeze | grep porter
conda activate your_env && python -m pip freeze | grep porter

To check the Python interpreter via Python:

python -c 'import sys; print(sys.executable);'

To check the sklearn-porter version via Python:

python -c 'from sklearn_porter import __version__; print(__version__);'

Kind regards,
Darius

@vladBaciu
Copy link

vladBaciu commented Jun 11, 2023

I had the same issue for a while, till I realized that the Python file where I was running the example had the same name as sklean_porter (sklean_porter.py).

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

No branches or pull requests

3 participants