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.11, Model, ImportError #1164

Open
fengints opened this issue Apr 28, 2024 · 9 comments
Open

Python 3.11, Model, ImportError #1164

fengints opened this issue Apr 28, 2024 · 9 comments

Comments

@fengints
Copy link

fengints commented Apr 28, 2024

Python 3.11.6, Clean install
pip install singa -f http://singa.apache.org/docs/next/wheel-cpu.html --trusted-host singa.apache.org

from singa import model

Error:
python3.11/site-packages/singa/model.py", line 30, in
from collections import Iterable
ImportError: cannot import name 'Iterable' from 'collections'

from collections import Iterable

I also tried importing Model

from singa import Model

File "", line 1, in
ImportError: cannot import name 'Model' from 'singa'

@lzjpaul
Copy link
Contributor

lzjpaul commented Apr 28, 2024

May I know did you use conda or other installation tools?

You can send an email to [email protected], we can discuss via email.

Thanks,
Zhaojing.

@fengints
Copy link
Author

fengints commented Apr 28, 2024

Iam using python and pip, no conda

@fengints
Copy link
Author

The Iterable abstract class was removed from collections in Python 3.10

https://docs.python.org/3.8/library/collections.html
Deprecated since version 3.3, will be removed in version 3.10: Moved Collections Abstract Base Classes to the collections.abc module. For backwards compatibility, they continue to be visible in this module through Python 3.9.

@lzjpaul
Copy link
Contributor

lzjpaul commented Apr 28, 2024

Iam using python and pip, no conda

Can you try the conda (miniconda or anaconda) and install the python 3.9. and then in the conda environment, you can try install singa 3.9 version. We provide python versions 3.9, 3.10 and 3.11

Thanks.

@fengints
Copy link
Author

i think python 3.9 would pass this error

@lzjpaul
Copy link
Contributor

lzjpaul commented Apr 28, 2024

An easier way is to download the wheel file from https://singa.apache.org/docs/next/wheel-cpu.html, and then install it locally.

For further enquiries, you can send an email to [email protected], and we can discuss them via email.

Thanks.

@fengints
Copy link
Author

Docs says singa supports python 3.9 , 3.10, 3.11

@fengints
Copy link
Author

fengints commented Apr 28, 2024

Python 3.10 and 3.11 doesn't have Iterable class in collections
https://docs.python.org/3.11/library/collections.html

@lzjpaul
Copy link
Contributor

lzjpaul commented Apr 28, 2024

i think python 3.9 would pass this error

Thanks for your suggestion!

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

No branches or pull requests

2 participants