Netflix/sureal

pip install, ./run_subj -> From sureal.config no module named config

x2eliah opened this issue · 10 comments

Installed via pip install sureal, on ubuntu 18.04 installation. Downloaded the git repository, tried to run ./run_subj, with or without arguments, own user or sudo-ed, either way it fails to run with this printback:

Traceback (most recent call last):
  File "./run_subj", line 11, in <module>
    from sureal.config import DisplayConfig
ImportError: No module named config

./unittest works...

Output from (rerunning) pip install sureal:

Requirement already satisfied: sureal in /home/elijs/.local/lib/python2.7/site-packages (0.1.1)
Requirement already satisfied: pandas>=0.19.2 in /home/elijs/.local/lib/python2.7/site-packages (from sureal) (0.23.4)
Requirement already satisfied: scipy>=0.17.1 in /home/elijs/.local/lib/python2.7/site-packages (from sureal) (1.1.0)
Requirement already satisfied: matplotlib>=2.0.0 in /home/elijs/.local/lib/python2.7/site-packages (from sureal) (2.0.2)
Requirement already satisfied: numpy>=1.12.0 in /home/elijs/.local/lib/python2.7/site-packages (from sureal) (1.15.4)
Requirement already satisfied: python-dateutil>=2.5.0 in /home/elijs/.local/lib/python2.7/site-packages (from pandas>=0.19.2->sureal) (2.7.5)
Requirement already satisfied: pytz>=2011k in /home/elijs/.local/lib/python2.7/site-packages (from pandas>=0.19.2->sureal) (2018.7)
Requirement already satisfied: subprocess32 in /home/elijs/.local/lib/python2.7/site-packages (from matplotlib>=2.0.0->sureal) (3.5.3)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in /home/elijs/.local/lib/python2.7/site-packages (from matplotlib>=2.0.0->sureal) (2.3.0)
Requirement already satisfied: six>=1.10 in /home/elijs/.local/lib/python2.7/site-packages (from matplotlib>=2.0.0->sureal) (1.10.0)
Requirement already satisfied: functools32 in /home/elijs/.local/lib/python2.7/site-packages (from matplotlib>=2.0.0->sureal) (3.2.3.post2)
Requirement already satisfied: cycler>=0.10 in /home/elijs/.local/lib/python2.7/site-packages (from matplotlib>=2.0.0->sureal) (0.10.0)
slhck commented

The last version on PyPI is from Sept. 13, so this should at some point be updated.

What happens if you clone this repo and do a pip install .?

slhck commented

Looking at the code, I think that installation via Pip and module handling is very likely to be broken; see also #12

idk if it is relevant anymore, but doing pip install . in a new clone-repo does not succeed:

    Complete output from command python setup.py egg_info:
    rm: cannot remove '/tmp/sureal_packaging_temp/sureal/config.py': No such file or directory
    running egg_info
    error: error in 'egg_base' option: 'pip-egg-info' does not exist or is not a directory
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-RSaLJJ/
slhck commented

Yes, I've come across the same issue. I tried to re-work everything; you may check my PR #13 in the meantime. Any input is welcome.

Thanks, your branch 'fix-package' (rel. #13) worked. (+ neater install and unittest highlighted the required/missing packages better).

slhck commented

Great, thank you for testing this! I'll wait for Zhi to review and merge the PR. Hope you can work with the tool in the meantime.

Thank you for providing the fixes :) MLE & MLE_CO work beautifully.

There are some small things that are misbehaving with the fix-package branch (dtype float64 json serialization w/ MOS models, python3 map indexability with --print argument...). Should I report details for those now (here or elsewhere) or should I wait until the fix-package branch is merged in?

slhck commented

I guess it would be better to fix these after the branch is merged. I guess the changes can be rebased from the source files, since I only moved them, but I don't know if it would complicate things.

Ok, sounds reasonable. Thank you. I'll check back / retest when the main branch is updated, and report if any issues persist.

@x2eliah @slhck I've merged #13 to master. Please let me know if there is any issues. Next step I'll update sureal on Pypi.