georasters icon indicating copy to clipboard operation
georasters copied to clipboard

Error installing georasters from pip

Open davidalejandro1223 opened this issue 5 years ago • 15 comments

So, im trying to install georasters from pip and it throws me the next error:

Could not find a version that satisfies the requirement matplotlib-base (from georasters)

I'm using diferent python versions, from 3.5 to 3.8 and nothing. I'm also tried to install matplotlib first but doesnt work either, However instalation from conda enviorments works just fine. there is any fix for instalation from pip?

davidalejandro1223 avatar Jul 21 '20 01:07 davidalejandro1223

Strange that you are getting that issue, since that one is only used in conda-forge installs. With pip only matplotlib is required. Is this the latest version on github or the pipy version? I am not sure if pipy is handling correctly the latest version.

ozak avatar Jul 21 '20 04:07 ozak

Using pipy version throws that previous error, installing github version throws the next one:

Collecting rtree
  Using cached Rtree-0.9.4.tar.gz (62 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/david/.virtualenvs/mapas/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-72pxb3qi/rtree/setup.py'"'"'; __file__='"'"'/tmp/pip-install-72pxb3qi/rtree/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-pip-egg-info-704ex397
         cwd: /tmp/pip-install-72pxb3qi/rtree/
    Complete output (15 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-72pxb3qi/rtree/setup.py", line 3, in <module>
        import rtree
      File "/tmp/pip-install-72pxb3qi/rtree/rtree/__init__.py", line 1, in <module>
        from .index import Rtree
      File "/tmp/pip-install-72pxb3qi/rtree/rtree/index.py", line 6, in <module>
        from . import core
      File "/tmp/pip-install-72pxb3qi/rtree/rtree/core.py", line 143, in <module>
        rt.Error_GetLastErrorNum.restype = ctypes.c_int
      File "/usr/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__
        func = self.__getitem__(name)
      File "/usr/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__
        func = self._FuncPtr((name_or_ordinal, self))
    AttributeError: /home/david/.virtualenvs/mapas/bin/python: undefined symbol: Error_GetLastErrorNum
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

i can't use conda environment for what i'm doing, there is any fix for instalation from pip?

davidalejandro1223 avatar Jul 21 '20 17:07 davidalejandro1223

That's an rtree issue, so you'd have to check with them about what the error is. pip is always an issue, which is why the conda-forge route is encouraged.

ozak avatar Jul 21 '20 17:07 ozak

Hey @davidalejandro1223, did you find a solution? I have the very same problem..

MouvementMondial avatar Jul 24 '20 08:07 MouvementMondial

@MouvementMondial I was able to install it from git, i.e. pip install git+https://github.com/ozak/georasters

frnsys avatar Aug 06 '20 14:08 frnsys

I guess this means something in the versioning in pipy may be not working correctly. I'll revamp the version number to ensure it is providing the latest version just in case.

ozak avatar Aug 06 '20 14:08 ozak

I just tried installing today (August 12/2020) and got the matplotlib-base error. I am doing this in the most recent version of WinPython so conda is not an option. Doing the git workaround is also not an option as the computer policies are such that installing Git is not an option.

davidanderson-1701 avatar Aug 12 '20 17:08 davidanderson-1701

This was supposedly resolved a while ago. Are you still getting this error?

ozak avatar Nov 16 '20 23:11 ozak

Hi, I am also having the installation problem. May I know if the program is up to date?

volkanyazici avatar Mar 21 '22 18:03 volkanyazici

It is up to date. What is your error?

ozak avatar Mar 21 '22 18:03 ozak

It is up to date. What is your error?

I am sending it as a file because the error code is too long. you can probably observe the errors in the file. https://we.tl/t-xj1pEdkI5z

volkanyazici avatar Mar 21 '22 18:03 volkanyazici

Is there a reason you cannot use conda? The errors you are getting seem to come from the dependencies, not from georasters itself.

ozak avatar Mar 21 '22 19:03 ozak

No particular reason but it's useless most of the time and I've had problems installing some packages. I just tried to install georasters package on conda but still getting errors.

volkanyazici avatar Mar 21 '22 20:03 volkanyazici

Strange. I just created a new environment using

conda create --name georasters -c conda-forge python=3.9 georasters

and it worked without any issues. should work with any other versions of python<=3.9. Haven't tested with 3.10, but as long as underlying packages work, it should work also.

ozak avatar Mar 21 '22 23:03 ozak

I reinstalled Anaconda and open a new environment. After all, it works now. Thanks.

volkanyazici avatar Mar 22 '22 09:03 volkanyazici