<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: python library versions error: numpy and matplotlib in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-library-versions-error-numpy-and-matplotlib/m-p/1557087#M73167</link>
    <description>&lt;P&gt;Pro 3.4, installed today&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;sys.version
'3.11.10 (main, Sep 20 2024, 18:44:55) [MSC v.1938 64 bit (AMD64)]'

np.__version__
'1.24.3'

scipy.__version__
'1.9.3'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the arcgispro-py3 environment&lt;/P&gt;&lt;P&gt;Addendum&lt;/P&gt;&lt;P&gt;You can install numpy 2.x into a arcgis pro environment since arcpy is compiled against the specified environment above.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will have to create a separate environment to do your numpy stuff separate from arcpy if that is your intent.&amp;nbsp; Also, you will find many things that you may need to fix in your current scripts&lt;/P&gt;&lt;P&gt;&lt;A href="https://numpy.org/doc/stable/numpy_2_0_migration_guide.html" target="_blank"&gt;NumPy 2.0 migration guide — NumPy v2.1 Manual&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 09 Nov 2024 02:42:08 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2024-11-09T02:42:08Z</dc:date>
    <item>
      <title>python library versions error: numpy and matplotlib</title>
      <link>https://community.esri.com/t5/python-questions/python-library-versions-error-numpy-and-matplotlib/m-p/1557068#M73166</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran into an interesting error today when trying to run a script I wrote. The script uses arcpy, numpy, and scipy. There seems to be some error when running arcgis pro commands that leverage the numpy library. I attempted to troubleshoot by checking the versions of different basic libraries. Below are the outputs from that effort. Is anyone aware of a possible issue with a new update of ArcGIS Pro or arcpy? Has anyone encounter a similar issue and have a workaround or solution? Thank you in advance for your consideration.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adam&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import sys&lt;BR /&gt;print(sys.version)&lt;BR /&gt;3.11.10 (main, Sep 20 2024, 18:44:55) [MSC v.1938 64 bit (AMD64)]&lt;BR /&gt;import numpy&lt;BR /&gt;print(numpy.__version__)&lt;BR /&gt;2.1.3&lt;BR /&gt;import scipy&lt;BR /&gt;print(scipy.__version__)&lt;BR /&gt;1.14.1&lt;BR /&gt;import matplotlib&lt;/P&gt;&lt;P&gt;A module that was compiled using NumPy 1.x cannot be run in&lt;BR /&gt;NumPy 2.1.3 as it may crash. To support both 1.x and 2.x&lt;BR /&gt;versions of NumPy, modules must be compiled with NumPy 2.0.&lt;BR /&gt;Some module may need to rebuild instead e.g. with 'pybind11&amp;gt;=2.12'.&lt;/P&gt;&lt;P&gt;If you are a user of the module, the easiest solution will be to&lt;BR /&gt;downgrade to 'numpy&amp;lt;2' or try to upgrade the affected module.&lt;BR /&gt;We expect that some modules will need time to support NumPy 2.&lt;/P&gt;&lt;P&gt;Traceback (most recent call last): File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\idlelib\run.py", line 165, in main&lt;BR /&gt;ret = method(*args, **kwargs)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\idlelib\run.py", line 579, in runcode&lt;BR /&gt;exec(code, self.locals)&lt;BR /&gt;File "&amp;lt;pyshell#15&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\matplotlib\__init__.py", line 113, in &amp;lt;module&amp;gt;&lt;BR /&gt;from . import _api, _version, cbook, _docstring, rcsetup&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\matplotlib\rcsetup.py", line 27, in &amp;lt;module&amp;gt;&lt;BR /&gt;from matplotlib.colors import Colormap, is_color_like&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\matplotlib\colors.py", line 56, in &amp;lt;module&amp;gt;&lt;BR /&gt;from matplotlib import _api, _cm, cbook, scale&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\matplotlib\scale.py", line 22, in &amp;lt;module&amp;gt;&lt;BR /&gt;from matplotlib.ticker import (&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\matplotlib\ticker.py", line 138, in &amp;lt;module&amp;gt;&lt;BR /&gt;from matplotlib import transforms as mtransforms&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\matplotlib\transforms.py", line 49, in &amp;lt;module&amp;gt;&lt;BR /&gt;from matplotlib._path import (&lt;BR /&gt;AttributeError: _ARRAY_API not found&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;pyshell#15&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;import matplotlib&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\matplotlib\__init__.py", line 113, in &amp;lt;module&amp;gt;&lt;BR /&gt;from . import _api, _version, cbook, _docstring, rcsetup&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\matplotlib\rcsetup.py", line 27, in &amp;lt;module&amp;gt;&lt;BR /&gt;from matplotlib.colors import Colormap, is_color_like&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\matplotlib\colors.py", line 56, in &amp;lt;module&amp;gt;&lt;BR /&gt;from matplotlib import _api, _cm, cbook, scale&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\matplotlib\scale.py", line 22, in &amp;lt;module&amp;gt;&lt;BR /&gt;from matplotlib.ticker import (&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\matplotlib\ticker.py", line 138, in &amp;lt;module&amp;gt;&lt;BR /&gt;from matplotlib import transforms as mtransforms&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\matplotlib\transforms.py", line 49, in &amp;lt;module&amp;gt;&lt;BR /&gt;from matplotlib._path import (&lt;BR /&gt;ImportError: numpy.core.multiarray failed to import&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 23:43:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-library-versions-error-numpy-and-matplotlib/m-p/1557068#M73166</guid>
      <dc:creator>AdamGallaher</dc:creator>
      <dc:date>2024-11-08T23:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: python library versions error: numpy and matplotlib</title>
      <link>https://community.esri.com/t5/python-questions/python-library-versions-error-numpy-and-matplotlib/m-p/1557087#M73167</link>
      <description>&lt;P&gt;Pro 3.4, installed today&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;sys.version
'3.11.10 (main, Sep 20 2024, 18:44:55) [MSC v.1938 64 bit (AMD64)]'

np.__version__
'1.24.3'

scipy.__version__
'1.9.3'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the arcgispro-py3 environment&lt;/P&gt;&lt;P&gt;Addendum&lt;/P&gt;&lt;P&gt;You can install numpy 2.x into a arcgis pro environment since arcpy is compiled against the specified environment above.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will have to create a separate environment to do your numpy stuff separate from arcpy if that is your intent.&amp;nbsp; Also, you will find many things that you may need to fix in your current scripts&lt;/P&gt;&lt;P&gt;&lt;A href="https://numpy.org/doc/stable/numpy_2_0_migration_guide.html" target="_blank"&gt;NumPy 2.0 migration guide — NumPy v2.1 Manual&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Nov 2024 02:42:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-library-versions-error-numpy-and-matplotlib/m-p/1557087#M73167</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2024-11-09T02:42:08Z</dc:date>
    </item>
  </channel>
</rss>

