niwidgets icon indicating copy to clipboard operation
niwidgets copied to clipboard

Python Version Support

Open cancan101 opened this issue 7 years ago • 7 comments

Clarify what version(s) of Python are supported.

  • using python_requires in setup.py
  • in the README

Right now it looks like testing is agaisnt python 3.x but that does not seem to be made explicit.

cancan101 avatar May 21 '18 14:05 cancan101

I think at the moment there's not technically anything that requires 3.5 upwards - it would be nice to not force people to upgrade while at the same time not making it seem like python 2 is supported.

Can people manually override the python_requires argument?

janfreyberg avatar May 22 '18 08:05 janfreyberg

@janfreyberg - for nipype tutorials we are currently trying out a combination of pytest and nbval to run notebooks and test their output. in addition to testing niwidgets base functionality using pytest we could run through a matrix of python versions to check where things fail. even if all maintenance is focused on 3.5+, it may be useful for people to know that the code runs fine on other versions.

there are some significant new api pieces in py 3.6/7 with respect to datatype hints. i suspect at some point this may override backwards compatibility.

satra avatar May 22 '18 12:05 satra

Yes, I think introducing type hints will be useful down the line, although at the moment they don't enable enough features (such as tab completion for function results etc.) to make it worth it.

I like the idea of testing notebooks with nbval though, that seems useful!

janfreyberg avatar May 22 '18 12:05 janfreyberg

The type hints do allow for autocomplete in eg PyCharm. That being said, I am also interested in Python 3 for some minor tweaks to syntax (eg kwarg only arguments).

cancan101 avatar May 22 '18 14:05 cancan101

That's fair enough - although the main environment for these widgets is jupyter, not PyCharm.

I personally don't have any qualms about dropping python 2 to be honest.

janfreyberg avatar May 22 '18 14:05 janfreyberg

Has anyone else tried using this with Python 3.9? I have been attempting to install this through git and pip with no success. The error message seems to indicate that the issue is with installing an older version of scikit-learn (v0.20.3 in requires.txt) instead of the current version (v1.1.3). If necessary, I can setup a virtual environment in Python 3.7, but it would be great if this package were updated to work with a more recent version of python.

kabaacke-psy avatar Nov 08 '22 19:11 kabaacke-psy

Has anyone else tried using this with Python 3.9? I have been attempting to install this through git and pip with no success. The error message seems to indicate that the issue is with installing an older version of scikit-learn (v0.20.3 in requires.txt) instead of the current version (v1.1.3). If necessary, I can setup a virtual environment in Python 3.7, but it would be great if this package were updated to work with a more recent version of python.

Yes, I am running into a similar problem. In a venv using Python3.11 I cannot seem to successfully install niwidgets due to the build process of scikit-learn (==0.20.4). I have tried to uninstall the previous version of scikit-learn==1.1.3 and it still doesn't work. What to do..

faering avatar Sep 29 '23 07:09 faering