Questions tagged [python-3]

Use this tag when Python 3 (or any of its dot releases) is the version you are using.

Filter by
Sorted by
Tagged with
13
votes
4answers
13k views

Will ArcGIS Desktop support latest Python 2.x or Python 3.x versions?

I'm curious to know whether ArcGIS Desktop 10.0 will support newer versions of Python than 2.6. And for that matter newer versions of NumPy (ie, 1.4, 1.5 etc). I'm sure that this documentation is on ...
11
votes
3answers
5k views

OSGeo4W shell with python3

I would like to use OSGeo4W shell with Python3 but when typing python3 I get the following error: Fatal Python error: Py_Initialize: unable to load the file system codec File "C:\OSGEO4~1\apps\...
10
votes
2answers
5k views

Using Python 3.x in ArcGIS?

I've been reading the "Whats New in ArcGIS" for the ArcGIS 10.3 update and came across the Python and ArcPy portion. It states that: ArcGIS 10.3 has been upgraded to include Python 2.7.8. Now ...
9
votes
3answers
3k views

Distinguishing Python version when using IDLE with ArcGIS Pro and ArcGIS 10.x for Desktop architecture?

I have just started to work with Python 3.4.1 which comes with ArcGIS Pro 1.0.0, on my laptop, which also has Python 2.7.8 which comes with ArcGIS 10.3 for Desktop installed, and I would like to ...
7
votes
3answers
7k views

Where can I find GDAL Python bindings for python 3.4?

Am using python 3.4 for development. I need GDAL python bindings for python 3.4. I have already gone through this site. I can find up to only 3.3?
6
votes
2answers
4k views

Python 3 support in QGIS?

As python3 is getting standard more and more I wonder wether there is or will be support for python 3 in QGIS?
5
votes
4answers
10k views

Is there Python 3 module to read .dbf files written by ArcGIS for Desktop?

I would like to know whether there are Python 3.x-compatible (preferably Python 3.3) modules to read the kind of .dbf files produced by ArcGIS for Desktop. All the modules I found were only ...
5
votes
2answers
2k views

Starting Python Shell Window of IDLE for use with ArcGIS Pro?

Prior to installing ArcGIS Pro 1.3 (I am now at 1.3.1), on Windows 7 SP1, I have been starting IDLE in a Python Shell Window from the Windows Start Menu using IDLE (Python GUI) in the Python 3.4 ...
5
votes
2answers
997 views

Python 3 with QGIS on Mac?

I need to start learning Python, and I want to learn with version 3.x. I understand that QGIS--at least some plug-ins--relies on Python and Tcl/Tk, and probably on specific versions. Assuming that ...
5
votes
2answers
112 views

MessageLevel in QGIS3

I am trying to migrate a plugin to QGIS3 from QGIS2 and I am having issues with an API. The original python has QgsMessageBar.MessageLevel but https://qgis.org/api/api_break.html says it has been ...
5
votes
3answers
5k views

Using PyScripter with ArcGIS for Desktop?

Can someone please let me know how I can set the PyScripter 2.5.3.0 x64 works with Python 2.7.3 which comes with ArcGIS what I did was: I installed the ArcGIS 10.2 I installed PyScripter 2.5.3.0 x64 ...
5
votes
1answer
3k views

Installing external python packages for QGIS 3?

While there are tools and methods for qgis 2 i cannot figure out for 3 I want to install external python packages such as sqlalchemy etc I tried the following things : Tried to download osgeo4w ...
5
votes
1answer
972 views

Sending arguments to LAStools function from Python script not working

I`m trying to call the lasground module from a python script, using this method: args=['lasground', '-i *.las', output_file, arg_step, arg_spike, arg_spikedown, arg_offset, arg_bulge, arg_cores] proc=...
5
votes
1answer
958 views

pyQGIS returns invalid layer with QgsVectorLayer in QGIS 3

I have the following problem : I've installed all pyQGIS environment on Windows 7. I work with 64 bits version of Python 3.6 and QGIS 3.0 and PyQt5. My Windows paths are ok. My objective is to create ...
5
votes
1answer
1k views

Getting log error about default locale settings when using GRASS with QGIS?

I downloaded python 3.6, installed it, dowloaded QGIS 3.0.2, installed GDAL, then QGIS, then opened QGIS and tried to use GRASS processing tools. Initially I got the following error: env: python3: No ...
5
votes
1answer
207 views

Make ST_Polygonize in Postgis return dangles, cuts and invalid rings

Postgis allows using ST_Polygonize() from GEOS to make polygons out of lines. I have seen the same function available in Shapely library for Python, but in Shapely, the other method named ...
4
votes
1answer
111 views

Why does osr.SpatialReference return different values in python2 and 3?

Can somebody explain why the result of osr.SpatialReference() differ between Python 2 and 3? sr = osr.SpatialReference() sr.SetFromUserInput('EPSG:28992') sr.ExportToProj4() In Python 2.7 this gives ...
4
votes
2answers
277 views

Bug using Python 3.7 (from QGIS) and trying to install package with pip

I use QGIS 3.6 and Python 3.7 and I try to install a package with pip in command line tool under Windows 7 but I have the following message : Fatal Python error: initfsencoding: unable to load the ...
4
votes
1answer
810 views

How to let ogr/gdal CreateLayer() create a `geom` field instead of `wkb_geometry`?

When creating a new table (PostGIS) using OGR/GDAL (2.1+), is there a way to select a specific name for the geometry field (such as geom), rather than using the default name? I created a new table ...
4
votes
4answers
5k views

How to (re)install gdal in python3 (mac)?

I am stuck trying to install gdal, running python3.6 on a Mac. When I run pip install gdal I get errors of Failed building wheel for gdal error: command 'gcc' failed with exit status 1 Command "/...
4
votes
1answer
57 views

Explaining pyproj to_epsg min_confidence parameter?

Following on from this question How can I get epsg code in pyproj with version==2.1.3, I discovered that sometimes when intialising a pyproj Proj instance with a string ESPG code eventually results in ...
4
votes
1answer
194 views

Weird schema lock issue

I wrote a Python script that produces several output features layers in separate .gdb's. As I am testing and modifying my code, I generally go into arcCatalog, find the .gdb under which the feature ...
3
votes
2answers
8k views

Fill color not showing appropriately in folium?

The following code should have shown different colored circles in a map. But my result was circles with no color at all. import folium import pandas data=pandas.read_csv("Volcanoes.txt") lat = list(...
3
votes
1answer
177 views

QGIS development version(2.99) and python api questions

Can I use QGIS 2.99 PyQGIS in standalone apps like the others QGIS version? Do I need python 3.6 to use this python api?
3
votes
1answer
69 views

Read numerical value of variable in NetCDF4 using Python

I need to undestand how I can get the numerical value of one channel IR_108 ( variable) in NetCDF4 and some other data: import numpy as np from netCDF4 import Dataset path = '/home/data/...
3
votes
1answer
41 views

Setting a Background Color with RVBT field with python

I'm trying to set the color of a background of a layer. To do this i created an attribute "Color" with the RVBT numbers associate to each feature. As in the picture, i want to set the color with those ...
3
votes
1answer
111 views

How to transliterate in QGIS using Python 3

I am QGIS user but beginner in Python. I figured out how to transliterate Georgian script into Latin using this module (https://pypi.org/project/transliterate/). from transliterate import translit, ...
3
votes
1answer
3k views

How to use two different Python versions (3.4 and 2.7) for QGIS scripting?

I´m intending to learn scripting with python in QGIS, but I have a couple of questions. I'm using Python 3.4 for learning which is installed in my laptop, but QGIS is using Python2.7 How could I ...
3
votes
1answer
140 views

Get xy coordinates of QgsMapCanvas in PyQGIS 3?

I am trying to get the QgsMapCanvas coordinates when they change using PyQt5 and PyQGIS 3. What I have used for that: self.canvas.scaleChanged.connect(lambda: self.showScale(self.canvas.scale())) ...
3
votes
1answer
212 views

Joining a shapefile attribute table to a CSV file pyqgis3.0

I would like to join a shapefile to a CSV file in PyQGIS 3.0. So, when I run the following code, it executes without errors but the join action does not succeed. What is wrong with the following code? ...
3
votes
1answer
475 views

Decoding this GIS blob

I am new to the decoding world (and even to the world of gis), but I am definitely not new to programming and large data. I was tasked with uncovering a column in our db with this information. It's ...
3
votes
0answers
50 views

Using both QGIS and native processing algorithms in standalone Python script?

I am developing a Python standalone script to process DEM in order to produce slope in vector format. I used PyQt5 to make a GUI to accept input data and parameters from user. My script is like this: ...
3
votes
0answers
200 views

Model in QGIS 3 (.model3) to Python 3? [duplicate]

I try to export a QGIS 3 model (.model3) to Python but the functionality that was available in QGIS 2 doesn't exist anymore. Is there a way to export it ?
3
votes
2answers
370 views

PyQGIS standalone script using QGIS 3.2

I want to work with PyQGIS Python 3 using QGIS 3.2 standalone install. I created a simple batch file to work with PyQGIS but I have some errors. Here's the batch file: @echo off SET OSGEO4W_ROOT=C:\...
3
votes
0answers
119 views

QGIS Build error : zzz-db_manager-5-depend error - qgis master 2.99

I am compiling QGIS from master in VS 2015 on x64. I am getting error as : Error MSB6006 "cmd.exe" exited with code 1. zzz-db_manager-5-depend 7 C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\...
3
votes
0answers
722 views

QGIS 2.99 and python 3.6

I install QGIS 2.99 development version on my windows 10. I see in the installation folder I have folders python27 and python36. I want to ask can i use python 3.6 to take QGIS python API in ...
3
votes
0answers
242 views

Installing Esri FGDB API with GDAL (Python 3.5) [closed]

I've recently migrated to ArcGIS Pro 1.4 and have had no problems moving from Python 2.7 to 3.5 - except one. I try to use gdal/ogr when I can in order to share scripts easily with those who do not ...
3
votes
0answers
5k views

install GDAL 2.0 on Ubuntu 14

I would like to install GDAL==2.0.1 on Ubuntu. A lot of possibilities are found on SO, but none did work for me. I'll give an overview of a selection of my attempts: 1. Using pip directly pip ...
3
votes
0answers
232 views

LatLon Package python 3.4

Does anybody know a package who work in python 3.4 as "LatLon" Package ? https://pypi.python.org/pypi/LatLon/1.0.1#downloads
3
votes
0answers
977 views

Can't install pyspatialite with python3 and sqlite3 [closed]

I can't install pyspatialite. When I try it gives me this error: pip install pyspatialite Downloading/unpacking pyspatialite Could not find a version that satisfies the requirement pyspatialite (from ...
2
votes
1answer
156 views

Open Data Cube how to continue after the creation of the database?

I have some questions about using Open Data Cube. First of all I have successfully installed the virtual environment with miconda and the database with PostgreSQLPortable-10.1.1. Now I have already ...
2
votes
2answers
355 views

Terminology for distinguishing ArcPy installed with ArcGIS 10.x for Desktop from that which comes with ArcGIS Pro?

ArcGIS Pro uses Python 3 whereas the other ArcGIS for Desktop applications (ArcMap, ArcCatalog, ArcScene and ArcGlobe) use Python 2 and the changes introduced with ArcGIS Pro were significant ...
2
votes
1answer
653 views

Getting bounding box from Point type GeoDataFrame to getting data from Osmnx

I've a point geodataframe which has only point features inside of it. fishnet_Id ... geometry 0 0 ... POINT (403486 4540640) 1 ...
2
votes
1answer
56 views

How to move a layer position on the layers order

I am looking for a way of moving a layer to the top of the layer order once another layer is loaded. Using the following code extracted from this answer I get the error: AttributeError: '...
2
votes
1answer
59 views

QGIS plugin: set the position of the featureForm

Im developing QGIS plugin (Python3) to open the featureForm (depending on some of my conditions (matching geometries,...))I use this code: layer = self.iface.activeLayer() ...
2
votes
2answers
474 views

Getting a county name using a 5 digit FIPS code

Lets say I have a five digit fips code: '13245'. I have a dictionary to handle know that the 2-digit state part of the code(ex: {'GA':'13', etc...}). But I want to also get the full county name (EX: ...
2
votes
1answer
88 views

Extracting lat , long & numeric value of one pixel for all variables in NetCDF4 file using Python?

I have an application with wxpython in which I can read and show NetCDF4 file and some information like x y coordinates. what I need is the numerical value or pixel value for the variable air dep ...
2
votes
1answer
71 views

Assigning function to a key in QGIS Plugin

I have trouble assigning function to a hotkey in my plugin. I have a class that does things with a mouse click. I'd like to assign another function to a keyboard key or sequence. I've tried two ...
2
votes
1answer
640 views

Getting error while importing GeoPandas in Python console

I have installed GeoPandas and its dependencies using pip install package_name. Here is the pip list output: Package Version attrs 18.2.0 Click 7.0 click-plugins 1....
2
votes
2answers
3k views

Visualizing GPS points on interactive map [closed]

I am using version 3.0 of python, I want to visualize GPS points in my dataset on interactive map. Is there any python library that can help me to visualize my data on maps. Reference of any tutorial ...