Subject: Marine Geospatial Ecology Tools (MGET) help
Text archives
- From: Jason Roberts <>
- To: Fred Bahr <>
- Cc: "" <>
- Subject: RE: [mget-help] MGET install script on windows can't change python path
- Date: Wed, 1 May 2019 22:18:40 +0000
- Accept-language: en-US
Hi Fred,
Most MGET users access MGET through ArcGIS, and for that reason, we recommend installing it into the copy of Python that ArcGIS installs. However if you want to call MGET from Python scripts it is possible to install it into other Python installations. This includes Anaconda, although I have not tried it on Anaconda in quite a while, so can’t say for certain that something is not broken.
It sounds like your Anaconda installation directory is not appearing in the MGET installer as something you can select, and you can only select the ArcGIS installation of Python (c:\python27\ArcGIS10.5\), is that correct?
I can think of two possible reasons why that might happen:
1. It is the 64-bit version of Anaconda. Unfortunately MGET is available for 32-bit Python, as not all of the modules and packages it includes will compile on 64-bit yet. (We are working on that, but it is a backburner project with no funding, and not ready yet.) So if you want to use MGET with Anaconda, you have to install the 32-bit version of Anaconda. It is ok that your Windows 10 machine is 64-bit Windows. 32-bit Python, Anaconda, and MGET will all run fine on it.
2. The Anaconda installer includes an option called “Register Anaconda as my default Python 2.7”, which is enabled by default. Normally I would not suggest enabling this option if you intended on using Python-based tools within ArcGIS, as I suspect it would register Anaconda’s Python with the operating system as the default handler for .py files, which would mean that when ArcGIS tried to run Python tools, Anaconda would be used and that might cause some problems. However I know the ESRI folks have specifically enabled Anaconda support (or at least Conda support) in certain scenarios, so it might be fine. In any case, I recommend caution and research if you intend on using ArcGIS. If not, then it should be fine to enable that option of the Anaconda installer. I suspect if it is NOT enabled, then Anaconda’s copy of Python might not appear in the MGET installer, as Anaconda might not write itself to Python’s registry keys, which is what’s needed for the MGET installer to discover it. So if you want to install MGET into Anaconda, you might have no choice but to enable that option. (In any case, it is possible to switch the machine back and forth between ArcGIS’s copy of Python and Anaconda’s, with surgical edits to the registry and Windows File Associations.)
I hope that helps. Let me know if you need additional clarifications. If you follow up on both of those and it does not work, it might be possible to copy MGET’s files from the ArcGIS installation into the Anaconda installation. If you were going to try that, contact me first, so I can tell you all of the necessary files.
Finally, there are some modules in MGET that interact with the Python numpy module through its binary interface (the so-called ABI). This requires dynamic linking, in which binary modules (DLL files) in MGET link to those in numpy. When numpy changes its interface, it requires MGET’s modules to be recompiled. Because this is somewhat tedious, we only do it when ArcGIS updates their copy of numpy, which happens very infrequently. It is likely that Anaconda is using a newer version of numpy than ArcGIS. MGET detects the version of numpy that is installed and selectively loads modules compatible with that version. It is likely that MGET does not include support for the version of numpy that is in recent builds of Anaconda.
Because of that, it may be that once you sort out the installation problem, MGET won’t work after all from within your copy of Anaconda, depending on which part of MGET you want to use. So it might be worth discussing what you intend do to first, before doing all the tinkering with your Anaconda installation. If you can describe what you’re trying to do, I can advise you on whether it might work.
Best, Jason
From: <>
On Behalf Of Fred Bahr
All, I have a version of anaconda python installed and this is where pywin installs. However MGET-0.8a71 has a python directory of c:\python27\ArcGIS10.5\ which can't be changed. How do I get MGET to install with this configuration of python. This is the error I get. I have installed pywin32 but it installs under Anaconda py27 not in python27. Below is the error message:
Running the pre-installation script failed Traceback (most recent call last): File "<string>", line 227, in <module> RuntimeError:
The Python for Windows Extensions (a.k.a. the pywin32 package) are not installed for this version of Python. MGET requires this package. Please download it from http://sourceforge.net/projects/pywin32/, install it, and run this MGET setup program again.
When you download it, be sure to select the package that is appropriate for your version of Python (version 2.7).
Note: This is on a windows 10 machine and the windows is technically 64bit not 32bit.
Cheers, Fred
Frederick Bahr |
- [mget-help] MGET install script on windows can't change python path, Fred Bahr, 05/01/2019
- RE: [mget-help] MGET install script on windows can't change python path, Jason Roberts, 05/01/2019
Archive powered by MHonArc 2.6.19.