nok / sklearn-porter

Transpile trained scikit-learn estimators to C, Java, JavaScript and others.
BSD 3-Clause "New" or "Revised" License
1.28k stars 170 forks source link

Error when installing #10

Closed magicorlan closed 7 years ago

magicorlan commented 7 years ago

The command: pip install sklearn-porter produces the following:

Collecting sklearn-porter
  Using cached sklearn-porter-0.3.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-2k6e9qlh/sklearn-porter/setup.py", line 6, in <module>
        from sklearn_porter import Porter
      File "/tmp/pip-build-2k6e9qlh/sklearn-porter/sklearn_porter/__init__.py", line 3, in <module>
        from Porter import Porter
    ImportError: No module named 'Porter'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-2k6e9qlh/sklearn-porter/
nok commented 7 years ago

Hello @magicorlan,

thanks for the hint. Which Python version do you use? 3.5? 3.X?

Happy coding, Darius 🌵

magicorlan commented 7 years ago

Hi again, my Python is 3.5.0 thanks.

andharris commented 7 years ago

Getting the same error with 3.6.0

magicorlan commented 7 years ago

To fix this problem I modified the imports, e.g. import .Porter directly in code (note the point before Porter)

nok commented 7 years ago

Hello @magicorlan and @andharris,

I don't finish the local tests, but I pushed the bugfixes and newest features to the development branch, which is the master branch. By using the following commands you can install and test the latest version:

pip uninstall -y sklearn-porter
pip install --no-cache-dir https://github.com/nok/sklearn-porter/zipball/master

Regards, Darius

nok commented 7 years ago

Hello @magicorlan,

the bug is fixed. Feel free to reopen this issue.

Thanks, Darius!