Giter VIP home page Giter VIP logo

Comments (13)

rzinke avatar rzinke commented on June 4, 2024 1

Solved!
I deleted the old conda environment and created a new one using the command on the MintPy Installation page:

$ conda env create -f /u/sarh0/rzinke/tools/MintPy/docs/conda_env.yml

This time, however, I first modified the conda_env.yml file to include geos and basemap as conda packages. My version of the conda_env.yml file looks like this:

# create environment : conda env create -f conda_env.yml
# update dependencies: conda env update -f conda_env.yml
# remove environment : conda env remove -n mintpy
# enter  environment : conda activate mintpy
# exit   environment : conda deactivate
name: MintPy
channels:
  - conda-forge
  - defaults
dependencies:
  - python>=3.6
  - cdsapi
  - cvxopt
  - dask>=1.0,<2.0
  - dask-jobqueue>=0.3,<1.0
  - ecCodes
  - h5py
  - lxml
  - matplotlib
  - netcdf4
  - numpy
  - openmp
  - pip
  - pygrib
  - pyhdf
  - pykdtree
  - pyproj
  - pyresample
  - scikit-image
  - scipy
  - geos
  - basemap
  - pip:
    - git+https://github.com/tylere/pykml.git

from mintpy.

yunjunz avatar yunjunz commented on June 4, 2024

the current basemap instruction is supposed to be a temporary solution, we should not spend time to make it perfect. The related installation will be much easier once basemap had a new (conda/macports) release, which should happen soon.

If your old installation works, there is no reason to update your installation right now. All mintpy's recent new feature does not require new python dependencies.

from mintpy.

rzinke avatar rzinke commented on June 4, 2024

Hello. Did this issue get fixed? I am reinstalling MintPy following the instructions on the homepage. I set up a python environment called MintPy and installed the conda packages listed in the /MintPy/docs/conda.txt file.

But when I try installing basemap, get an error message:
(MintPy) [rzinke@sar ~]$ pip install https://github.com/matplotlib/basemap/archive/v1.2.1rel.tar.gz
Collecting https://github.com/matplotlib/basemap/archive/v1.2.1rel.tar.gz
Downloading https://github.com/matplotlib/basemap/archive/v1.2.1rel.tar.gz (132.5MB)
|████████████████████████████████| 132.5MB 153.8MB/s
ERROR: Command errored out with exit status 1:
command: /u/sar-r0/rzinke/python/miniconda3/envs/MintPy/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-wykj70gd/setup.py'"'"'; file='"'"'/tmp/pip-req-build-wykj70gd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-req-build-wykj70gd/pip-egg-info
cwd: /tmp/pip-req-build-wykj70gd/
Complete output (18 lines):
checking for GEOS lib in /home/rzinke ....
checking for GEOS lib in /home/rzinke/local ....
checking for GEOS lib in /usr ....
checking for GEOS lib in /usr/local ....
checking for GEOS lib in /sw ....
checking for GEOS lib in /opt ....
checking for GEOS lib in /opt/local ....

Can't find geos library in standard locations ('/home/rzinke', '/home/rzinke/local', '/usr', '/usr/local', '/sw', '/opt', '/opt/local').
Please install the corresponding packages using your
systems software management system (e.g. for Debian Linux do:
'apt-get install libgeos-3.3.3 libgeos-c1 libgeos-dev' and/or
set the environment variable GEOS_DIR to point to the location
where geos is installed (for example, if geos_c.h
is in /usr/local/include, and libgeos_c is in /usr/local/lib,
set GEOS_DIR to /usr/local), or edit the setup.py script
manually and set the variable GEOS_dir (right after the line
that says "set GEOS_dir manually here".
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Have you encountered this message before and is there a simple solution?

from mintpy.

ehavazli avatar ehavazli commented on June 4, 2024

Hey @rzinke,

I think your problem may be related to GDAL. Please try

conda list | grep geos

and

conda list | grep gdal

in your mintpy environment and check if geos is installed as part of conda and which version of GDAL is installed (it is 2.4.1 for me).

If not go ahead and install geos which I believe comes with gdal:

conda install geos

Also check:

basemap github page https://github.com/matplotlib/basemap

they have an installation guide which outlines the error you just described.

from mintpy.

rzinke avatar rzinke commented on June 4, 2024

Thanks @ehavazli. I now tried
$ conda list | grep geos > geos 3.8.0 he1b5a44_0 conda-forge
and
$ conda list | grep gdal > [returns nothing]

I installed gdal, and geos using conda (in the MintPy environment), so now geos is version 3.8.0; gdal is version 3.0.2. However, when I try
pip install https://github.com/matplotlib/basemap/archive/v1.2.1rel.tar.gz
I get the same error message as above.

from mintpy.

yunjunz avatar yunjunz commented on June 4, 2024

Hi @rzinke, could you double-check the pip command you used is from the MintPy conda environment using which pip? Mine is as below for example.

/Users/yunjunz/development/python/miniconda3/envs/MintPy/bin/pip

If it's the case and it still does not work, try to install the development version of basemap.

$PYTHON3DIR/bin/pip install git+https://github.com/matplotlib/basemap.git

from mintpy.

rzinke avatar rzinke commented on June 4, 2024

Hi @yunjunz, here is the result
(MintPy) [rzinke@sar ~]$ which pip
/u/sar-r0/rzinke/python/miniconda3/envs/MintPy/bin/pip

I get the same error as before with
(MintPy) [rzinke@sar ~]$ pip install git+https://github.com/matplotlib/basemap.git

Collecting git+https://github.com/matplotlib/basemap.git
Cloning https://github.com/matplotlib/basemap.git to /tmp/pip-req-build-jv600l6e
Running command git clone -q https://github.com/matplotlib/basemap.git /tmp/pip-req-build-jv600l6e
ERROR: Command errored out with exit status 1:
command: /u/sar-r0/rzinke/python/miniconda3/envs/MintPy/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-jv600l6e/setup.py'"'"'; file='"'"'/tmp/pip-req-build-jv600l6e/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-req-build-jv600l6e/pip-egg-info
cwd: /tmp/pip-req-build-jv600l6e/
Complete output (18 lines):
checking for GEOS lib in /home/rzinke ....
checking for GEOS lib in /home/rzinke/local ....
checking for GEOS lib in /usr ....
checking for GEOS lib in /usr/local ....
checking for GEOS lib in /sw ....
checking for GEOS lib in /opt ....
checking for GEOS lib in /opt/local ....

Can't find geos library in standard locations ('/home/rzinke', '/home/rzinke/local', '/usr', '/usr/local', '/sw', '/opt', '/opt/local').
Please install the corresponding packages using your
systems software management system (e.g. for Debian Linux do:
'apt-get install libgeos-3.3.3 libgeos-c1 libgeos-dev' and/or
set the environment variable GEOS_DIR to point to the location
where geos is installed (for example, if geos_c.h
is in /usr/local/include, and libgeos_c is in /usr/local/lib,
set GEOS_DIR to /usr/local), or edit the setup.py script
manually and set the variable GEOS_dir (right after the line
that says "set GEOS_dir manually here".
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

from mintpy.

rzinke avatar rzinke commented on June 4, 2024

Hi, was anyone able to find a solution or workaround for this? I deleted my old mintpy conda environment and created a new one, following exactly the steps on the Installation page. The installation failed with the same error as before:
Downloading and Extracting Packages
python-3.7.6 | 52.9 MB | ############################################################################### | 100%
cvxopt-1.2.3 | 536 KB | ############################################################################### | 100%
setuptools-44.0.0 | 659 KB | ############################################################################### | 100%
pyresample-1.14.0 | 700 KB | ############################################################################### | 100%
pillow-7.0.0 | 643 KB | ############################################################################### | 100%
pyyaml-5.3 | 184 KB | ############################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Ran pip subprocess with arguments:
['/u/sar-r0/rzinke/python/miniconda3/envs/mintpy/bin/python', '-m', 'pip', 'install', '-U', '-r', '/u/sarh0/rzinke/tools/MintPy/docs/condaenv.u793u5b4.requirements.txt']
Pip subprocess output:
Collecting git+https://github.com/tylere/pykml.git (from -r /u/sarh0/rzinke/tools/MintPy/docs/condaenv.u793u5b4.requirements.txt (line 1))
Cloning https://github.com/tylere/pykml.git to /tmp/pip-req-build-rlisewme
Collecting https://github.com/matplotlib/basemap/archive/v1.2.1rel.tar.gz (from -r /u/sarh0/rzinke/tools/MintPy/docs/condaenv.u793u5b4.requirements.txt (line 2))
Downloading https://github.com/matplotlib/basemap/archive/v1.2.1rel.tar.gz

Pip subprocess error:
Running command git clone -q https://github.com/tylere/pykml.git /tmp/pip-req-build-rlisewme
ERROR: Command errored out with exit status 1:
command: /u/sar-r0/rzinke/python/miniconda3/envs/mintpy/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-24nz4hze/setup.py'"'"'; file='"'"'/tmp/pip-req-build-24nz4hze/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-req-build-24nz4hze/pip-egg-info
cwd: /tmp/pip-req-build-24nz4hze/
Complete output (18 lines):
checking for GEOS lib in /home/rzinke ....
checking for GEOS lib in /home/rzinke/local ....
checking for GEOS lib in /usr ....
checking for GEOS lib in /usr/local ....
checking for GEOS lib in /sw ....
checking for GEOS lib in /opt ....
checking for GEOS lib in /opt/local ....

Can't find geos library in standard locations ('/home/rzinke', '/home/rzinke/local', '/usr', '/usr/local', '/sw', '/opt', '/opt/local').
Please install the corresponding packages using your
systems software management system (e.g. for Debian Linux do:
'apt-get install libgeos-3.3.3 libgeos-c1 libgeos-dev' and/or
set the environment variable GEOS_DIR to point to the location
where geos is installed (for example, if geos_c.h
is in /usr/local/include, and libgeos_c is in /usr/local/lib,
set GEOS_DIR to /usr/local), or edit the setup.py script
manually and set the variable GEOS_dir (right after the line
that says "set GEOS_dir manually here".
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

CondaEnvException: Pip failed

I will try to find my geos directory and set it manually.

from mintpy.

yunjunz avatar yunjunz commented on June 4, 2024

Hi @rzinke, I spent some time and have not been able to figure out the cause. I would suggest the same: trying to set it manually.

from mintpy.

yunjunz avatar yunjunz commented on June 4, 2024

That's great @rzinke!

Could you confirm whether basemap works properly by runing view.py -h?

from mintpy.

rzinke avatar rzinke commented on June 4, 2024

Hi @yunjunz, yes, just ran a test patch. tsview.py and view.py work just fine.
Thanks.

from mintpy.

yunjunz avatar yunjunz commented on June 4, 2024

Great! Could you issue a pull request for your changes? Thank you!

from mintpy.

yunjunz avatar yunjunz commented on June 4, 2024

Hi @falkamelung, could you test if Rob's solution - adding basemap to conda.txt (conda installed geos for basemap from my testing on Mojave and Catalina) - works for you on Linux when you got a chance? It seems like conda install basemap works now.

from mintpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.