<?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: Multiple versions of Python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/multiple-versions-of-python/m-p/76055#M6178</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Curtis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. I wanted to be sure I had not missed some great screaming reason NOT to give it a shot.&lt;/P&gt;&lt;P&gt;Your note makes me feel a lot better going forward with 3.x.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Nov 2014 17:18:37 GMT</pubDate>
    <dc:creator>GeorgeSinkinson</dc:creator>
    <dc:date>2014-11-06T17:18:37Z</dc:date>
    <item>
      <title>Multiple versions of Python</title>
      <link>https://community.esri.com/t5/python-questions/multiple-versions-of-python/m-p/76051#M6174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm looking for recommendations on how to handle multiple versions of Python on a single machine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have ArcGIS 10.2.1 for Desktop installed on a Windows 8.1 machine.&lt;/P&gt;&lt;P&gt;The installation of ArcGIS set up Python in C:\Python27\ArcGIS10.2.&lt;/P&gt;&lt;P&gt;The Readme indicates this is Python version 2.7.5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to use Python version 3.4.2 for some non-ArcGIS applications.&lt;BR /&gt;I'm assuming the install would set up in something like C:\Python34&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking for help on several things:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - some rational directory structure approach and naming&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - what to do with the scripts in C:\Python27\ArcGIS10.2\Tools&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't want to compromise the ability to use Python with ArcGIS but&lt;BR /&gt;I don't have any idea if all the version 2 scripts are still valid in version 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know if I need to keep both versions, but if so, how would I control&lt;BR /&gt;which version is invoked? Currently there isn't any Python entry in my&lt;BR /&gt;PATH statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, obviously a 'newbie', but I'd like to start off in the right direction ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 19:33:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multiple-versions-of-python/m-p/76051#M6174</guid>
      <dc:creator>GeorgeSinkinson</dc:creator>
      <dc:date>2014-11-05T19:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple versions of Python</title>
      <link>https://community.esri.com/t5/python-questions/multiple-versions-of-python/m-p/76052#M6175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My recommendation is to stick with the 2.7.x version associated with ArcMap 10.x.x unless you have a real compelling reason to run python 3.x (just to explore in my mind is not compelling enough).&amp;nbsp; It can be done...I just don't recommend it unless you are good at the whole path/default/registry thing or...unless you have a separate machine to install it on&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 19:55:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multiple-versions-of-python/m-p/76052#M6175</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-11-05T19:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple versions of Python</title>
      <link>https://community.esri.com/t5/python-questions/multiple-versions-of-python/m-p/76053#M6176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, Python 3 will install in its own folder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You probably want to just make sure the Windows file associations continue to link .py and .pyc files to the older version of Python by default, and launch your python 3 scripts explicitly. You may have to change them back if you want Python 2.x to continue to be the default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ArcGIS seems to keep track in the registry which Python it uses so I haven't had big problems with that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Python 3 has a new feature called the &lt;A href="http://legacy.python.org/dev/peps/pep-0397/"&gt;Launcher&lt;/A&gt; that allows you to get around the limitations of Windows file associations, for example, you can add a "shebang" line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14152574298593063 jive_text_macro" jivemacro_uid="_14152574298593063"&gt;
&lt;P&gt;#! python3&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which will make Python scripts always run in 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may want to look into installing ArcGIS Pro pre-release, which includes a Python 3.4.1 installer set up to be able to install Pro's 3.4-compatible arcpy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/message/434209"&gt;How do you get Python 3.4 to see ArcGIS Pro arcpy?&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get a start on making sure your scripts will be 3.x compatible by including this line near the top of your scripts that you are running at 2.x:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14152576188155246 jive_text_macro" jivemacro_uid="_14152576188155246"&gt;
&lt;P&gt;from __future__ import print_function&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 07:03:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multiple-versions-of-python/m-p/76053#M6176</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-11-06T07:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple versions of Python</title>
      <link>https://community.esri.com/t5/python-questions/multiple-versions-of-python/m-p/76054#M6177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan,&lt;/P&gt;&lt;P&gt;Thanks for taking the time to reply. And your words of caution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Having just jumped from Win XP to 8.1, I understand your point,&lt;/P&gt;&lt;P&gt;but I guess we need to keep moving forward rather than get run over&lt;/P&gt;&lt;P&gt;from behind ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 17:11:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multiple-versions-of-python/m-p/76054#M6177</guid>
      <dc:creator>GeorgeSinkinson</dc:creator>
      <dc:date>2014-11-06T17:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple versions of Python</title>
      <link>https://community.esri.com/t5/python-questions/multiple-versions-of-python/m-p/76055#M6178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Curtis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. I wanted to be sure I had not missed some great screaming reason NOT to give it a shot.&lt;/P&gt;&lt;P&gt;Your note makes me feel a lot better going forward with 3.x.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 17:18:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multiple-versions-of-python/m-p/76055#M6178</guid>
      <dc:creator>GeorgeSinkinson</dc:creator>
      <dc:date>2014-11-06T17:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple versions of Python</title>
      <link>https://community.esri.com/t5/python-questions/multiple-versions-of-python/m-p/76056#M6179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone have a good setup figured out for this? With Python 3.x installed somewhere, but python 2.7.5 (e.g. with ArcGIS 10.2.2) also running fine within ArcGIS Desktop?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Python 3.x seems to have many advantages like built-in pip, better treatment of unicode, and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 09:09:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multiple-versions-of-python/m-p/76056#M6179</guid>
      <dc:creator>EliseAcheson</dc:creator>
      <dc:date>2016-07-26T09:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple versions of Python</title>
      <link>https://community.esri.com/t5/python-questions/multiple-versions-of-python/m-p/76057#M6180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Take a look at Anaconda: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.continuum.io" rel="nofollow" target="_blank"&gt;https://www.continuum.io&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; I've had it installed for years and have multiple different python environments (~12) for different applications.&amp;nbsp; I've never had it cause problems with the ESRI included python distribution.&amp;nbsp; Every environment is completely separate.&amp;nbsp; The conda package manager, part of anaconda, is now even included with ArcGIS Pro 1.3.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IMPORTANT: &lt;/STRONG&gt;To avoid breaking ArcGIS (or other software), during the installation of Anaconda &lt;STRONG&gt;uncheck&lt;/STRONG&gt; the checkboxes&amp;nbsp; (a) make Anaconda the default Python and (b) add Anaconda's Python to the PATH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another option would be to use virtualenv (&lt;A href="https://virtualenv.pypa.io/en/stable/" title="https://virtualenv.pypa.io/en/stable/"&gt;Virtualenv — virtualenv 15.0.2 documentation&lt;/A&gt; ) to create new virtual environments but it seems like conda is prefered at least in the scientific community lately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some links with using anaconda with arcgis desktop.&lt;/P&gt;&lt;P&gt;&lt;A href="https://my.usgs.gov/confluence/pages/viewpage.action?pageId=540116867" title="https://my.usgs.gov/confluence/pages/viewpage.action?pageId=540116867"&gt;Using Anaconda modules from the ESRI python environment (All Users) - USGS OEI/Enterprise GIS - myUSGS Confluence&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migration-blogpost/55511"&gt;Connecting Arcpy to Your Jupyter Notebook&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;Sage&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 12:08:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multiple-versions-of-python/m-p/76057#M6180</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-07-26T12:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple versions of Python</title>
      <link>https://community.esri.com/t5/python-questions/multiple-versions-of-python/m-p/76058#M6181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks a lot for the suggestion. Actually that is exactly what I was doing this morning before I saw your reply.&lt;/P&gt;&lt;P&gt;It is working great so far!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some details:&lt;/P&gt;&lt;P&gt;- I have Anaconda installed (comes with Python 3.5, 64-bit option for Windows on the &lt;A href="https://www.continuum.io/downloads"&gt;downloads page&lt;/A&gt;) at C:/Anaconda3&lt;/P&gt;&lt;P&gt;- that python executable is in C:/Anaconda3/python.exe and runs python 3.5, and I can import packages for python 3.5 via typing in a console "conda install package-name" (this will go to the default anaconda environment, at the moment I only have one)&lt;/P&gt;&lt;P&gt;- when I launch python command the way I used to (e.g. Windows icon &amp;gt; "python (command line)"), it shows python version 2.7.5 running (this came with ArcGIS 10.2.2), and just to confirm it's using the right libraries, if I type "import os", then "os.path", it shows where that module is: &amp;lt;module 'ntpath' from 'C:\Python27\ArcGISx6410.2\lib\ntpath.pyc'&amp;gt;, this is actually the 64-bit running&lt;/P&gt;&lt;P&gt;- I can launch ArcMap, choose 'Python' under Geoprocessing, to open the Python window, and do as above with import os etc. (this one is actually using the 32-bit python in my case).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, all is well so far. Note that during the install of anaconda, the dialog had the two questions Sage Wall mentions, with a slight modification, in that it actually asked: "make Anaconda the default Python 3.5", and not the "default Python", so I kept this box ticked, because the anaconda Python 3.5 is the only 3.5 Python that I have installed (the others are 2.7.5). No issues so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~elise&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 15:50:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multiple-versions-of-python/m-p/76058#M6181</guid>
      <dc:creator>EliseAcheson</dc:creator>
      <dc:date>2016-07-26T15:50:13Z</dc:date>
    </item>
  </channel>
</rss>

