<?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 name 'pyroj' is not defined in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/name-pyroj-is-not-defined/m-p/1500017#M70960</link>
    <description>&lt;P&gt;I have a python script I have always run from command line prompts that prints maps from MXD/ ArcGIS. It says the following error when trying to run it:&amp;nbsp;&lt;/P&gt;&lt;P&gt;os.environm{PROJ_LIB] = pyproj.datadir.get_dta_dir()&lt;/P&gt;&lt;P&gt;NameError: name&amp;nbsp;pyproj' is not defined&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand this may be due to some change in my python environment based on other comments I can find.&amp;nbsp; Can anyone help with next steps to remedy this? Below is how my script begins if that is helpful:&lt;/P&gt;&lt;P&gt;import arcpy, os, time, sys&lt;BR /&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2024 18:46:20 GMT</pubDate>
    <dc:creator>kaww02</dc:creator>
    <dc:date>2024-07-01T18:46:20Z</dc:date>
    <item>
      <title>name 'pyroj' is not defined</title>
      <link>https://community.esri.com/t5/python-questions/name-pyroj-is-not-defined/m-p/1500017#M70960</link>
      <description>&lt;P&gt;I have a python script I have always run from command line prompts that prints maps from MXD/ ArcGIS. It says the following error when trying to run it:&amp;nbsp;&lt;/P&gt;&lt;P&gt;os.environm{PROJ_LIB] = pyproj.datadir.get_dta_dir()&lt;/P&gt;&lt;P&gt;NameError: name&amp;nbsp;pyproj' is not defined&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand this may be due to some change in my python environment based on other comments I can find.&amp;nbsp; Can anyone help with next steps to remedy this? Below is how my script begins if that is helpful:&lt;/P&gt;&lt;P&gt;import arcpy, os, time, sys&lt;BR /&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 18:46:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/name-pyroj-is-not-defined/m-p/1500017#M70960</guid>
      <dc:creator>kaww02</dc:creator>
      <dc:date>2024-07-01T18:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: name 'pyroj' is not defined</title>
      <link>https://community.esri.com/t5/python-questions/name-pyroj-is-not-defined/m-p/1500020#M70961</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;import arcpy, &lt;STRONG&gt;pyproj&lt;/STRONG&gt;, os, time, sys&lt;BR /&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;Oops, sorry formatting got me. Try this.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 18:54:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/name-pyroj-is-not-defined/m-p/1500020#M70961</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2024-07-01T18:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: name 'pyroj' is not defined</title>
      <link>https://community.esri.com/t5/python-questions/name-pyroj-is-not-defined/m-p/1500060#M70963</link>
      <description>&lt;P&gt;&lt;A href="https://pyproj4.github.io/pyproj/stable/" target="_blank"&gt;pyproj 3.6.1 documentation (pyproj4.github.io)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;you may have to install it with conda or pip if it isn't available for import&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 20:17:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/name-pyroj-is-not-defined/m-p/1500060#M70963</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2024-07-01T20:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: name 'pyroj' is not defined</title>
      <link>https://community.esri.com/t5/python-questions/name-pyroj-is-not-defined/m-p/1501451#M70987</link>
      <description>&lt;P&gt;If your code relies on packages outside the default arcpy environment, it's good practice to import the pip module and either wrap their imports in a try except ImportError block and then run pip.main(["install", "&amp;lt;module&amp;gt;"]) or check the sys.modules environment variable for the module name and then pip.main...&lt;/P&gt;&lt;P&gt;arcpy tends to overwrite installed modules when it gets an update because the environment is pulled from ESRI&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 05:51:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/name-pyroj-is-not-defined/m-p/1501451#M70987</guid>
      <dc:creator>HaydenWelch</dc:creator>
      <dc:date>2024-07-04T05:51:50Z</dc:date>
    </item>
  </channel>
</rss>

