Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.7 Support #1511

Closed
laserprec opened this issue Aug 27, 2021 · 7 comments
Closed

Python 3.7 Support #1511

laserprec opened this issue Aug 27, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@laserprec
Copy link
Contributor

Description

We should extend the support of recommenders to python 3.7.

Expected behavior with the suggested feature

We should modify our CIs to run our checks in py37 and fix any relevant issue raised from it.

Other Comments

@anargyri, I think you mentioned problems with numba in python3.7 in venv installation. Is there an existing issue we can link to? I can also take a look.

@laserprec laserprec added enhancement New feature or request build labels Aug 27, 2021
@anargyri
Copy link
Collaborator

I don't think we have opened an issue about this. But I found a workaround, see https://github.com/microsoft/recommenders/tree/andreas/simon_feedback#getting-started
i.e. if you conda install numpy-base at the end then the tests pass.

@laserprec laserprec mentioned this issue Aug 27, 2021
4 tasks
@anargyri
Copy link
Collaborator

I could not get venv to work with python 3.7

@laserprec
Copy link
Contributor Author

laserprec commented Aug 27, 2021

My understanding is that a venv in a conda-enabled environment (including a DSVM) is not truly self-contained. I have tried venv installation on a DSVM (without conda activated) and run into sklearn-surprise installation issues and this is not an issue if I run venv installation in a fresh ubuntu image... Maybe there's some custom PATH/ENV VAR modification in DSVM so it's not so friendly for venv? I can try to replicate this error in 3.7 on an ubuntu image.

@anargyri
Copy link
Collaborator

Well, I have tested venv on a DSVM and it does work with Python 3.6 (see these docker images https://github.com/microsoft/recommenders/blob/4a9063d6ba1f5216816661516f29cbff3494879c/tools/docker/Dockerfile)
The breaking issue between 3.6 and 3.7 is that numpy error (which conda addresses with numpy-base).

@laserprec
Copy link
Contributor Author

Yup. I can replicate this import error in py3.7 in venv.

.tox/gpu/lib/python3.7/site-packages/numba/core/pythonapi.py:12: in <module>
    from numba import _helperlib
E   ImportError: numpy.core.multiarray failed to import

@laserprec laserprec mentioned this issue Sep 2, 2021
4 tasks
@anargyri
Copy link
Collaborator

@laserprec I found a solution to this (see the above PR) by installing Surprise from source (the issue was caused by the .pyx files in Surprise which apparently were compiled with an incompatible numpy version).

@laserprec
Copy link
Contributor Author

@anargyri this is AWESOME! Thanks Andreas!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants