Open SaschaAtOmina opened 1 year ago
The pkg_resource does not play well with non-standard PATH apparently
I'm not sure what you mean by that? What is non-standard about the PATH here?
The only place where this variable is used is in main.py, so a simple fix is to move it there, so that we can import the surprise module without any issue.
Unfortunately we still need __version__
to be in __init__.py
, since this is the standard way of defining package versions in Python
Description
I need to be able to dynamically add/remove scikit-surprise (installed in advance somewhere else than in my
venv
) to/from my PATH to perform some processing. This cannot be done because of the__version_
variable defined here https://github.com/NicolasHug/Surprise/blob/master/surprise/__init__.py#L50 Thepkg_resource
does not play well with non-standard PATH apparently. The only place where this variable is used is in__main__.py
, so a simple fix is to move it there, so that we can import thesurprise
module without any issue.Expected Results
import surprise
should just work, even if it was installed on another PATH and added dynamically.Actual Results
Versions
surprise 1.1.3 but there is a circular import issue too ...