Posts

Showing posts from August, 2018

How to upgrade to Postgis 2.4.4

To upgrade postgis, you need download the tarball and compile it: wget https://download.osgeo.org/postgis/source/postgis-2.4.4.tar.gz tar xvzf postgis-2.4.4.tar.gz cd postgis-2.4.4 ./configure configure: WARNING:  --------- GEOS VERSION WARNING ------------  configure: WARNING:   You are building against GEOS 3.5.1  configure: WARNING:   To take advantage of all the features of  configure: WARNING:   this PostGIS version requires GEOS 3.7.0 or higher which is not out yet. configure: WARNING:   To take advantage of most of the features of this PostGIS configure: WARNING:   we recommend GEOS 3.6 or higher configure: WARNING:   You can download the latest versions from  configure: WARNING:   http://trac.osgeo.org/geos  We need to install the lastest geos version cd .. wget http://download.osgeo.org/geos/geos-3.7.0rc1.tar.bz2 tar xjvf geos-3.7.0rc1.tar.bz2 cd geos-3.7.0rc1 ./configure make -j4; sudo make install Now, come back to postgis to finish the configuration

AttributeError: module 'lib' has no attribute 'SSL_ST_INIT'

I wanted to upgrade pip but I couldn't by the following error: sudo pip install --upgrade pip  Traceback (most recent call last):   File "/usr/local/bin/pip", line 7, in <module>     from pip._internal import main   File "/usr/local/lib/python3.5/dist-packages/pip/_internal/__init__.py", line 42, in <module>     from pip._internal import cmdoptions   File "/usr/local/lib/python3.5/dist-packages/pip/_internal/cmdoptions.py", line 16, in <module>     from pip._internal.index import (   File "/usr/local/lib/python3.5/dist-packages/pip/_internal/index.py", line 14, in <module>     from pip._vendor import html5lib, requests, six   File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/requests/__init__.py", line 97, in <module>     from pip._vendor.urllib3.contrib import pyopenssl   File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/urllib3/contrib/pyopenssl.py",

How to insert code in an interactive python console througth Visual Studio Code

Image
After run your code, to edit or add new instructions is not neccesary run all your code again. A good idea is to run a partial or section code. To do it, you must run your code as interactive mode. You have 3 ways to do it with vscode: 1.- Task You can create a task to run python in interactive mode. Press Ctrl+Shift+P and type: Configure Task Paste the following code: { "version" : "2.0.0" , "tasks" : [ { "label" : "Run File" , "command" : "python3 -i ${file}" , "type" : "shell" , "group" : { "kind" : "build" , "isDefault" : true }, "presentation" : { "reveal" : "always" , "focus" : true } } This task is