POST
|
I made a comment on an existing topic, but I figured that it was probably better to ask this as its own question. I installed ArcGIS Pro 2.0 yesterday. When trying to launch the Python CLI, it states in angry red letters, "Failed to initialize Python Interpreter." I am on Windows 7 x64. ArcGIS Pro 2 was installed to: C:\Users\[my username]\AppData\Local\ArcGIS\Pro Prior to this, the Python that comes with ArcMap 10.5 was my system python. I also do open-source GIS development on this workstation. Here is what my environment variables (user) look like. I've tried adding some things into the PYTHONPATH variable to see if I can't make it work - so this is for testing purposes only. GDAL_DATA=C:\Python27\ArcGIS10.5\Lib\site-packages\osgeo\data\gdal GDAL_DRIVER_PATH=C:\Python27\ArcGIS10.5\Lib\site-packages\osgeo PATH=...C:\Users\[username]\AppData\..\Pro\bin\Python;..\..\Pro\bin\Python\Scripts;..\..\Pro\bin\Python\envs\arcgispro-py3;..\..\Pro\bin\Python\envs\arcgispro-py3\Scripts PIP_CONFIG_FILE=C:\Users\[username]\AppData\Roaming\Python\pip.conf PYTHONPATH=..\..\Pro\bin\Python\envs\arcgispro-py3;..\..\Pro\bin\Python\envs\arcgispro-py3\Scripts Obviously there are some path issues. When I fire up a Windows CLI I do get into the arcgispro-py3 python instance, but I feel I'm "doing it wrong." When I type in "conda" I get the errors: File "conda\cli\main.py", line 222, in <module> File "conda\cli\main.py", line 185, in pre File "conda\base\context.py", line 274, in envs_dirs File "conda\base\context.py", line 270, in root_writable File "conda\gateways\disk\test.py", line 66, in prefix_is_writable conda.CondaError: Unable to determine if prefix 'C:\ArcGISPro\bin\Python' is writable. Since nothing is IN C:\ArcGISPro\bin\Python (that's not where ArcGIS Pro was installed), I removed the path. Now it says, conda.CondaError: Unable to determine if prefix 'C:\Users\[username]\AppData\Local\Temp\1\[directory name changes each time]' is writable. Failed to execute script main So, the problem is twofold: 1. I cannot get at a Python CLI in the Pro interface. 2. I cannot 'conda' anything from CLI. Any help appreciated! Please no voodoo suggestions like "just uninstall everything and run a registry cleaner" because I am not an administrator on this workstation.
... View more
07-27-2017
10:19 AM
|
0
|
3
|
2031
|
POST
|
I just ran into this problem with ArcGIS Pro 2.0. First, it said that the system tools could not be loaded. Then, when I tried to fire up the python CLI, it said "Failed to Initialize Python Interpreter." ArcGIS Pro's python instance is not my system python, nor do I want it to be. What are my options?
... View more
07-27-2017
07:56 AM
|
0
|
3
|
426
|
POST
|
Thanks Ian. It felt like I should be able to dump the method into a variable in one step like other methods to save a line of code, but regardless, it works now, thank you.
... View more
03-23-2017
07:27 AM
|
0
|
1
|
2329
|
POST
|
Thanks Ian/Joshua, When I include the .gdb extension (gdb_name = 'TestGDB.gdb') and the geodatabase exists, it completes. When the geodatabase does not exist, it creates the TestGDB.gdb object, but still gives me the same runtime error.
... View more
03-23-2017
07:12 AM
|
0
|
3
|
2329
|
POST
|
Any reason why this wouldn't be working? import arcpy
import os
basedir = 'C:\\Temp'
gdb_name = 'TestGDB'
gdb = os.path.join(basedir, gdb_name)
if arcpy.Exists(gdb):
arcpy.env.workspace = gdb
else:
gdb = arcpy.CreateFileGDB_management(basedir, gdb_name)
arcpy.env.workspace = gdb I must not be understanding how .Exists() resolves, for if the gdb already exists, it gives me: arcgisscripting.ExecuteError: ERROR 000258: Output C:\Temp\TestGDB.gdb already exists Failed to execute (CreateFileGDB) If the gdb does not exist, it gives me: RuntimeError: Object: Error in accessing environment <workspace>
... View more
03-23-2017
06:55 AM
|
0
|
12
|
3894
|
POST
|
Sorry for the lag Joshua, for whatever reason, geonet does not email me updates to my questions. I am using fully qualified column names, yes. For Dan's question below, I can only add a field to the origin table; ArcMap will not allow me to add a field to a destination table. At this point I do have a working output; this is something I did for a colleague, and if this is going to be an ongoing thing, I will just do it via script Thanks!
... View more
02-24-2017
11:57 AM
|
0
|
0
|
2713
|
POST
|
So here is what I had to do, and this may be an ArcMap bug in 10.5 - I will attempt to replicate and confirm. First, I had to do a straight subtract. Then, I had to run: abs(!field_1! - !field_2!) on the column. I was not able to run the 'abs' module first; it would give me zeros. Once I ran subtraction first, I could then run the 'abs' module in order to switch it from negative values.
... View more
02-22-2017
01:32 PM
|
0
|
2
|
2713
|
POST
|
Hi Dan, The fields aren't called field_1 or field_2, I just put that for placeholders and brevity. You are correct on all counts. I have two tables, joined. The two fields, one from each table, I am attempting to calculate are both double and both tables obey the same schema. The field I am calculating into, is double as well. When I try to use math.abs() it fails, telling me that the module has no attribute 'abs'. When I do a basic subtraction, it does work, so I know there isn't any problem with the join itself.
... View more
02-22-2017
01:29 PM
|
0
|
0
|
2713
|
POST
|
Hi Joshua, no, this does not work in the same way. In python, I could just do >>>abs(x - y) in Field Calculator (using python) I put abs(!field_1! - !field_2!) and it does nothing.
... View more
02-22-2017
12:58 PM
|
0
|
3
|
2713
|
POST
|
I can't believe that this problem is stumping me, but stumped me it has. All I'm trying to do is use the field calculator to derive a difference between the numbers (double) in two columns. The numbers are all over the place; I can't do a subtraction, I'm just looking for the delta. There is an Abs() visual basic function, but I can't find any documentation on how it should work, or on whether it works the way that abs() in python does. If someone can explain which of the functions in Field Calculator I can use to derive a numerical difference, I'd appreciate it. I'm on ArcGIS Desktop 10.5 by the way.
... View more
02-22-2017
12:16 PM
|
0
|
9
|
9216
|
IDEA
|
I work with some amount of NITF data. NITF is commonly distributed as either *.nitf or *.ntf. ArcGIS Pro only recognizes *.ntf. ArcGIS Desktop allowed me to add a new raster type to account for different extensions of the same file format. I would like ArcGIS Pro to give me the ability to add in different extensions for known raster file types.
... View more
02-09-2017
08:03 AM
|
3
|
1
|
719
|
POST
|
Michael, thanks, found the how-to for that. It'll work, sort of. I still consider this insufficient, because whenever one wants to add an enduring connection, one cannot merely add it, but has to reload and resave a separate template project, re-distribute it to a team, etc. I feel like the move away from the catalog workflow was sort of developed and decided upon in a vacuum. I hope some aspects of Catalog make a comeback in future point releases, and that this is just Esri's version of Windows 8's Metro interface.
... View more
02-03-2017
01:16 PM
|
1
|
2
|
1569
|
POST
|
We are slowly loading ArcGIS Pro on our office network - one thing every single person has asked is: How do we "permanently" add service or database connections that persist *across* projects? I understand what it means to work on a project basis. However, there are certain services that will apply for all projects done in a professional place of business; namely, an office's own enterprise geospatial database. Is it possible for this to be done?
... View more
02-03-2017
09:16 AM
|
3
|
8
|
2983
|
POST
|
I figured that this one would be pretty easy, but I'm having trouble finding it via google. How do I (with arcpy/python) get current map viewer center coordinates or corner coordinates? I'm constructing geospatial URL queries, and I want the tool to automatically send the viewer center point, or the 4 corner coordinates, as part of the URL payload.
... View more
11-10-2016
09:41 AM
|
0
|
3
|
1625
|
Title | Kudos | Posted |
---|---|---|
1 | 03-04-2024 09:12 AM | |
4 | 03-06-2024 05:47 AM | |
1 | 01-31-2019 11:15 AM | |
6 | 09-15-2023 11:45 AM | |
10 | 07-31-2023 12:15 PM |