You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
'import chumpy' fails: ImportError: cannot import name 'bool' from 'numpy' #55
>>> import chumpy
/usr/local/lib/python3.9/site-packages/chumpy/__init__.py:11: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/usr/local/lib/python3.9/site-packages/chumpy/__init__.py:11: FutureWarning: In the future `np.object` will be defined as the corresponding NumPy scalar.
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
/usr/local/lib/python3.9/site-packages/chumpy/__init__.py:11: FutureWarning: In the future `np.str` will be defined as the corresponding NumPy scalar.
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.9/site-packages/chumpy/__init__.py", line 11, in <module>
from numpy import bool, int, float, complex, object, unicode, str, nan, inf
ImportError: cannot import name 'bool' from 'numpy' (/usr/local/lib/python3.9/site-packages/numpy/__init__.py)
>>>
This issue was fixed recently but not yet sync up to PyPi (as discussed in #49), you can install the fixed version with pip install git+https://github.com/mattloper/chumpy
Reacted by Julian Nubert, Laura Bravo Sánchez, Yuichi Kato, Pierre Moulon @ Meta, Frano Rajič, qingxinxia, Sungheon Park, Piyawat Tangpong, Zan Wang, Caiyi Sun and 24 more
Reacted by Vida Adeli, Marc Benedí, Boqian Li, Wang Qiang, h-shad and Michele Ferrari
would it be possible to update the pypi?
The latest version in pypi is still 0.70, while the current master has 0.71 (which makes it hard to generate reproducible config files).
Reacted by keee, Liam Schoneveld, Zhe Chen, Tobias Kirschstein, Minchao Zhang, Gauthier and Chris Rapson
fwiw I worked around it by downgrading numpy from 1.26.4 to 1.23.0 which seems to still be OK for my purposes, but I'll try the git+https approach later.
fwiw I worked around it by downgrading numpy from 1.26.4 to 1.23.0 which seems to still be OK for my purposes, but I'll try the git+https approach later.
git+https works, as expected. I was able to use numpy 2.0.2, for reference. If it's OK for you to downgrade numpy as I did, there are now two workarounds available :)
Activity
yurivict commentedon Dec 28, 2023
The documentation says that numpy has
bool_, notbool.kairusann commentedon Dec 31, 2023
This issue was fixed recently but not yet sync up to PyPi (as discussed in #49), you can install the fixed version with
pip install git+https://github.com/mattloper/chumpydlazares commentedon Mar 8, 2024
thanks @kairusann!
when pypi fix?
Updating installation with smplx
nubertj commentedon Aug 6, 2024
would it be possible to update the pypi?
The latest version in pypi is still 0.70, while the current master has 0.71 (which makes it hard to generate reproducible config files).
icedwater commentedon Sep 12, 2024
fwiw I worked around it by downgrading numpy from 1.26.4 to 1.23.0 which seems to still be OK for my purposes, but I'll try the git+https approach later.
icedwater commentedon Sep 13, 2024
git+https works, as expected. I was able to use numpy 2.0.2, for reference. If it's OK for you to downgrade numpy as I did, there are now two workarounds available :)
lucasjinreal commentedon Dec 5, 2025
exec(code, locals())
File "", line 11, in
ModuleNotFoundError: No module named 'pip'
[end of output]
asrathore-ai commentedon Dec 9, 2025
You are using some older chumpy, add
pip install --no-build-isolationchris-rapson-hectre commentedon Mar 12, 2026
This combination worked for me:
This seems like something that should be fixed urgently, since python3.9 is now end of life!
Some linked issuea (#2899, #3218) recommend removing chumpy from the requirements, but when I tried that I got an error that mmcv depends on it.