Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install geos-3.3.3 configure error: on ubuntu20.04 #488

Closed
kinglionsz opened this issue Feb 21, 2020 · 3 comments
Closed

install geos-3.3.3 configure error: on ubuntu20.04 #488

kinglionsz opened this issue Feb 21, 2020 · 3 comments

Comments

@kinglionsz
Copy link

With Python 2 having been end-of-life since the start of the year and Ubuntu 20.04 being a long-term support release, Ubuntu developers are working hard to ensure Python 2 isn't shipped as part of this next Ubuntu LTS release.

In fact, when I installed the package, I was already aware of a problem, not code, but it was actually the code problem.

When I installed geso package,I had to stop.because the print:

matplotlibBasemap\basemap-master\geos-3.3.3\configure:

`

am_cv_python_version=`$PYTHON -c "import sys; print(sys.version[:3])"`

am_cv_python_platform=`$PYTHON -c "import sys; print(sys.platform)"`

  am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX'))" 2>/dev/null ||
     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`

`

You'll find that I've changed the code.Yes.

In fact, when I installed the package, I was already aware of a problem, not code, but it was actually the code problem.

Starting today, we'll have to consider upgrading the code.

Do you have any good ideas?

Thanks

@kinglionsz
Copy link
Author

kinglionsz commented Feb 21, 2020

error:
Swig: false
Python bindings: false
Ruby bindings: false
PHP bindings: false

checking for python... /usr/bin/python
checking for python version... File "", line 1
import sys; print sys.version[:3]
^
SyntaxError: invalid syntax

checking for python platform... File "", line 1
import sys; print sys.platform
^
SyntaxError: invalid syntax

checking for python script directory... ${prefix}/lib/python/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python/site-packages
./configure: line 13386: test: =: unary operator expected
checking for Python include path... /usr/include/python3.8
checking for Python library path...
configure: error: cannot find Python library path

solved:
./configure --prefix=$GEOS_DIR --enable-python

gedit ./configure
find import sys
change print ... > print(...)

then restart ./configure

ok now

geos3 3 configure_print

@molinav
Copy link
Member

molinav commented Dec 21, 2020

Hi @kinglionsz,

Thanks for the feedback. Actually the current GEOS version that is part of this repository is quite old. If you are a Ubuntu 20.04 user, the setup.py file should be able to compile _geoslib with the system GEOS library if it is installed (sudo apt-get install python3-dev libgeos-3.8.0 libgeos-dev). In this case you do not need to care about compiling GEOS or providing the GEOS_DIR environment variable.

In the following days I will be probably updating a bit the GEOS-related part of basemap, I would like to start using at least its version 3.5.2 since this one allows to compile GEOS quite straightforward with cmake under GNU/Linux and also Windows.

@molinav
Copy link
Member

molinav commented Dec 5, 2021

@kinglionsz I uploaded preliminary wheel files to PyPI with libgeos_c already bundled, we will have a stable release in PyPI soon so that end users do not need to be compiling GEOS themselves.

@molinav molinav closed this as completed Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants