Python: Difference between revisions

m
no edit summary
(Marked this version for translation)
mNo edit summary
Line 591: Line 591:


=== AttributeError: module ‘numpy’ has no attribute ‘X’. === <!--T:96-->
=== AttributeError: module ‘numpy’ has no attribute ‘X’. === <!--T:96-->
When installing a wheel that request any <tt>numpy</tt> version, the latest available will then be installed. In numpy v1.20, many attributes were set for deprecation and are now [https://numpy.org/devdocs/release/1.24.0-notes.html#expired-deprecations deprecated in v1.24].
When installing a wheel that requests any <tt>numpy</tt> version, the latest available version will be installed.
In numpy v1.20, many attributes were set for deprecation and are now [https://numpy.org/devdocs/release/1.24.0-notes.html#expired-deprecations expired in v1.24].


<!--T:97-->
<!--T:97-->
This result in an error: <code>AttributeError: module ‘numpy’ has no attribute ‘bool’</code> depending on the attribute accessed.
This may result in an error, depending on the attribute accessed.  For example, <code>AttributeError: module ‘numpy’ has no attribute ‘bool’</code>.


<!--T:98-->
<!--T:98-->
This can be solved by installing a previous version of numpy : <tt>pip install --no-index 'numpy<1.24'</tt>
This can be solved by installing a previous version of numpy: <tt>pip install --no-index 'numpy<1.24'</tt>
 
</translate>
</translate>
Bureaucrats, cc_docs_admin, cc_staff
2,879

edits