21

There's no need to edit batch files (and break python 2.7 in the process) or set environment variables manually. Just run py3_env which sets the shell up for Python 3 automatically, then run python3. From a OSGeo4W shell with just python 2 & 3 installed: C:\> o-help -={ OSGeo4W Shell Commands }=- dllupdate pip3 ...


12

There is a not well documented command build into OSGeo4W Shell which sets the shell up to python3 as Luke mentions py3_env Basically it sets your PYTHONHOME and the correct PATH. Then you can call Python3 with python3. C:\>py3_env C:\>SET PYTHONPATH= C:\>SET PYTHONHOME=C:\OSGEO4~1\apps\Python36 C:\>PATH C:\OSGEO4~1\apps\Python36;C:\OSGEO4~1\...


11

As all Python programmers, I will first see the Python package Index for dbf files (it is specified if they are not compatible with Python 3 or Python 2). dbfread, for example, works with Python 2.x and Python 3.x. a geospatial modules like GDAL/OGR can be used but it needs to be compiled (Linux, Mac OS X). For the Windows users, Christoph Gohlke provides ...


9

This is not exactly what you asked for, but a workaround could be to add both IDLE instances to your Send To context menu option. open %APPDATA%\Microsoft\Windows\SendTo choose > New > Shortcut specify the path and command for IDLE, eg C:\Python27\ArcGIS10.2\pythonw.exe "C:\Python27\ArcGIS10.2\Lib\idlelib\idle.pyw" repeat for the other IDLE version Now ...


8

That's all controlled from the registry. You could open the registry and find HKEY_CLASSES_ROOT\\Python.File\\shell\\Edit with Idle and re-name that folder to something like Edit with Idle 2.7 You could then add a new reg key (for example copy this into notepad and save as "Idle3.4.reg", then double click to install the reg key) Windows Registry Editor ...


8

To address @CodyBrown comments here: I don't know how this is opinion based. I am asking whether ESRI has plans to move to Python 3x in the near future or not. As answered below by James and Ann, they obviously do with Pro and thus probably will with Desktop, tat is if they continue with Desktop. As of today, there are no plans to move Desktop/...


8

Python 3.6 has landed in QGIS 2.99:


7

pyrogerg, you can have several versions of Python on your Mac (Mac OS X's, Macports, python.org framework, etc.) and it will not mess with QGIS, or any of the other versions of Python (older, but still relevant, similar question). You can also switch between them, or call a specific-version interpreter in Terminal (e.g. /usr/bin/python2.5), and some folks ...


7

The projections differ in the datum shift values for the conversion from Amersfoort datum to WGS84. The first one is tfm code 4833, and the second is tfm code 15934. GDAL 2.1.0 uses tfm code 4833, while GDAL 2.2.0 and later uses tfm code 15934. The change was done in https://trac.osgeo.org/gdal/changeset/37081 According to the remarks, 4833 is the latest ...


6

First make sure you have the 32 bit PyScripter installed, not the 64 bit. Then in Tools -> Python Path make sure you have PyScripter pointing to the following paths: C:\Program Files (x86)\PyScripter\Lib\rpyc.zip C:\Windows\system32\python27.zip C:\Python27\ArcGIS10.2\DLLs C:\Python27\ArcGIS10.2\lib C:\Python27\ArcGIS10.2\lib\plat-win C:\Python27\ArcGIS10....


6

This summer Esri was saying that ArcGIS Pro will go Python 3. The legacy ArcGIS Desktop will stick with Python 2.x as long as it can. I believe there are a bunch of Python 3 migration ArcGIS Pro tutorials on Esri's support page. Python 3 migration ArcGIS Pro uses Python 3.4. This is a significant change from other ArcGIS products including ArcGIS for ...


5

You can start the Python IDLE GUI from the Start Menu using the ArcGIS Pro Python command prompt. Start Menu > All Programs > ArcGIS > ArcGIS Pro > Python Command Prompt This will open a command prompt window at the current ArcGIS Pro python conda environment. Typing idle at this prompt will open the IDLE GUI.


5

According the documentation, when you're creating a CircleMarker object the fill parameter defaults to False. Try explicitly setting it to True in your code: #... for lt, ln, el in zip(lat, lon, elev): cm = folium.CircleMarker(location=[lt, ln], radius = 6, popup=str(el)+" m", ...


5

Your expression shouldn't include variable names. You're writing: "(+DemoField+ * !TractPercent!) / !BufferPOP!" but it should be: "(!{}! * !TractPercent!) / !BufferPOP!".format(DemoField.name)


5

I encounter that problem after installing QGIS 3, too. Therefore, I install Python packages in following way: Copy python3.dll and python36.dll in (QGIS_PATH)/bin folder to (QGIS_PATH)/apps/Python36/ folder. Open command prompt as administrator. Go to Python36 folder. cd c:/(QGIS_PATH)/apps/Python36 Install Pyhon packages by python -m pip install ...


5

I'm assuming that you have set the datacube up (test that with datacube system check). Otherwise, get started with the following doc, cross-checking whether you've completed all the steps mentioned in it! CEOS-SEO - Get Started Step 1 :- Download Satellite images. Choose a dataset. e.g. Landsat 8 level 1. It can be downloaded from USGS Earth Explorer. ...


5

This is a great question and I will do my best to answer. To begin, the init style syntax is deprecated (https://pyproj4.github.io/pyproj/stable/gotchas.html#init-auth-auth-code-should-be-replaced-with-auth-auth-code). So, instead of CRS(init="epsg:4544"), you should use CRS("epsg:4544"). I discovered that sometimes when intialising a pyproj Proj ...


5

No, the problem does not have anything to do with ArcGIS or arcpy. SyntaxError means that there is a problem with the syntax of your program and it identifies this error before running anything. In your case, you have an opening parenthesis that should not be there and is triggering the error. On the line: structureMultiplier = (arcpy.GetParameterAsText(5) #...


4

If you are on Windows you could give the precompiled wheels by Christoph Gohlke a try, he has a stable 1.11 with bindings for Python 3.4 listed. If you are on Linux your best bet is compiling from source with support for your Python version (./configure --with-python).


4

There is a lot of information explaining where paths are and how to launch things in this post here. It should be the first stop (besides doc) on the changes to Python in Pro 1.3. In short if you want to launch IDLE, it'd typically be found here now: "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\idlelib\idle.bat" Note - in the post above ...


4

The major difference that could affect all of your current scripts is that ArcGIS Pro's ArcPy module uses Python 3.x, which has many differences from 2.x. For example, the simple print function from 2.x will not execute in 3.x because it has to use parenthesis. There are many other differences that you will need to check depending on what you use in your ...


4

As you can see from http://gdal.org/python/osgeo.ogr.DataSource-class.html#CreateLayer, CreateLayer support also "options" which are "None" by default. The papszOptions argument can be used to control driver specific creation options. These options are normally documented in the format specific documentation. Usage example for PostgeSQL and Python ...


4

Had the same problem and ended with installing python3 with anaconda, and then installed geopandas with conda install -c conda-forge geopandas conda-forge is community curated packaging for python distribution of anaconda. Since installing geopandas is a hell, they created packages of versions that work with each other. Since then I haven't encountered any ...


4

You have asked this question many times. You are creating Result objects and then try to use these as layers. You need to start Reading the help sections for correct input/syntax. Input for SelectLayerByAttributes is a layer, not a feature class like you are trying to pass. import arcpy fc = r'C:\data.gdb\Parcels' #You need a layer to use in SelectLayer..:...


4

Use MakeFeatureLayer_management to make a layer from your shapefile. (This layer will be saved in memory, so you won't actually be saving a layer file anywhere, and it will be deleted when the application exits.) Then pass that layer to SelectLayerByAttribute_management: featureLayer = arcpy.MakeFeatureLayer_management(S_Fld_Haz_Ar, "featureLayer") arcpy....


4

You can use the total_bounds property for this. Small example: In [83]: from shapely.geometry import Point In [84]: import geopandas In [86]: import random In [87]: df = geopandas.GeoDataFrame({'geometry': [Point(random.random(), random.random()) for _ in range(10)]}) In [93]: df Out[93]: geometry 0 POINT (0....


4

Please switch to GRASS GIS 7.7 if you need Python3 support. A lot of effort has already been invested here (which will not be backported to older versions). You will save plenty of time (and not reinvent the wheel) when switching to GRASS GIS 7.7+. Details are found at https://trac.osgeo.org/grass/wiki/Python3Support Edit: Since yesterday there are ready-...


4

If you use OSGeo4W try: In OSGeo4W installer: install python3-pip In OSGeo4W shell: call C:\OSGeo4W64\bin\py3_env.bat In OSGeo4W shell: pip3 install desired-package-name


4

As documented in https://pypi.org/project/GDAL/ plain "gdal" is deprecated and you should not use that for writing any new code Additionally, there are five compatibility modules that are included but provide notices to state that they are deprecated and will be going away. If you are using GDAL 1.7 bindings, you should update your imports to ...


3

There is a part of response in ArcGISPro Faq The big difference is ArcGIS use Python 3.x and not Python 2.x. You need upgrade your script before use it in ArcGIS Pro You can go to these link for more information: Should I use Python 2 or Python 3 for my development activity? Porting Python 2 Code to Python 3


Only top voted, non community-wiki answers of a minimum length are eligible