question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

python3.10 compatibility

See original GitHub issue

Motivation for the feature

Python3.10 is standard now: Ubuntu 22.04 came out last month and uses it as its default. But ivadomed is only marked compatible up to 3.9, meaning it cannot be installed on Ubuntu 22.04, or anyone else using an up-to-date system.

This follows https://github.com/ivadomed/ivadomed/issues/770.

Description of the feature

Change

https://github.com/ivadomed/ivadomed/blob/1da019b80be95d99905579dc66de15538141e487/setup.py#L35

to read

    python_requires='>=3.6,<3.11',

and fix anything this breaks.

Additional context

Due to https://github.com/neuropoly/computers/issues/338, ivadomed now has to hide inside of conda envs set up like conda create -n my_env python==3.8 when we are using it internally on romane.neuro.polymtl.ca or rosenberg.neuro.polymtl.ca to do research. And come to think of it, this would affect SCT too, which we usually run on joplin.neuro.polymtl.ca – except SCT bundles its own conda.

It would be nice to have the flexibility to install ivadomed with the faster pip install --user or python -m venv again.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
GeorgeS2019commented, May 30, 2022

@kanishk16

onnxruntime 1.12 that supports python 3.10 is scheduled to be released by mid-July. Also, https://github.com/microsoft/onnxruntime/issues/9782 suggests to downgrade to 3.9.x. I was wondering if we could wait till mid-July and in the meantime bump up torch & drop support for python 3.6.

Information where to download onnxruntime 1.12 is embedded within the notebook

The notebook [updated ~1 month ago] requirement for onnxruntime 1.12 is mandatory.

from packaging import version
from onnxruntime import __version__ as ort_version

if version.parse(ort_version) >= version.parse("1.12.0"):
    from onnxruntime.transformers.models.gpt2.gpt2_helper import Gpt2Helper, MyGPT2LMHeadModel
else:
    from onnxruntime.transformers.gpt2_helper import Gpt2Helper, MyGPT2LMHeadModel

    raise RuntimeError("Please install onnxruntime 1.12.0 or later to run this notebook")

Onnxruntime 1.12 needs to be provided as nightly (not just for python, but also for c#, c++ etc. )

1reaction
kanishk16commented, May 30, 2022

onnxruntime 3.12 that supports python 3.10 is scheduled to be released by mid-July. Also, https://github.com/microsoft/onnxruntime/issues/9782 suggests to downgrade to 3.9.x. I was wondering if we could wait till mid-July and in the meantime bump up torch & drop support for python 3.6.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python 3.10 support table for most popular Python packages
Python 3.10 is a currently supported version of Python . This site shows Python 3.10 support for the 360 most downloaded packages on...
Read more >
What's New In Python 3.10 — Python 3.11.1 documentation
This article explains the new features in Python 3.10, compared to 3.9. Python 3.10 was released on October 4, 2021. For full details,...
Read more >
Support Python 3.10? - General Discussion - TensorFlow Forum
We now have nightly Python3.10 wheels for Linux and MacOS. You can get them via pip install tf-nightly on the corresponding operating system....
Read more >
Easy, clean, reliable Python 2/3 compatibility — Python-Future ...
python-future is the missing compatibility layer between Python 2 and Python 3. It allows you to use a single, clean Python 3.x-compatible codebase...
Read more >
Changes/Python3.10 - Fedora Project Wiki
Upgrade/compatibility impact ... All the packages that depend on Python 3 must be rebuilt. User written Python 3 scripts/applications may ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found