sklearn-porter icon indicating copy to clipboard operation
sklearn-porter copied to clipboard

ImportError: cannot import name 'Porter'

Open elimsjxr opened this issue 3 years ago • 2 comments

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?

elimsjxr avatar Oct 02 '21 11:10 elimsjxr

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

nok avatar May 16 '22 20:05 nok

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).

vladBaciu avatar Jun 11 '23 09:06 vladBaciu