ImportError: cannot import name 'Porter'
elimsjxr opened this issue · comments
elimsjxr commented
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?
Darius Morawiec commented
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
Baciu Vlad-Eusebiu commented
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).