Skip to content

Fix requirenments.txt #13

@TC406

Description

@TC406

No errors during installation via pip install aeronetlib/. But then error fall down after trying to import aeronetlib:

from aeronet.converters.split import split
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/user/.conda/envs/test_aeronetlib/lib/python3.7/site-packages/aeronet/converters/split.py", line 4, in <module>
    from ..dataset import BandCollection
  File "/home/user/.conda/envs/test_aeronetlib/lib/python3.7/site-packages/aeronet/dataset/__init__.py", line 8, in <module>
    from .vector import Feature
  File "/home/user/.conda/envs/test_aeronetlib/lib/python3.7/site-packages/aeronet/dataset/vector/__init__.py", line 1, in <module>
    from .feature import Feature, FeatureCollection
  File "/home/user/.conda/envs/test_aeronetlib/lib/python3.7/site-packages/aeronet/dataset/vector/feature.py", line 2, in <module>
    import rtree
ModuleNotFoundError: No module named 'rtree'

rtree Is imported from aeronet/dataset/vector/feature.py
But there no rtree package in requirenments.txt .
I tried to install rtree via pip https://pypi.org/project/Rtree/ but pip had fall following error.

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Collecting Rtree
  Using cached Rtree-0.9.3.tar.gz (520 kB)
    ERROR: Command errored out with exit status 1:
     command: home/user/.conda/envs/test_aeronetlib/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dgw70zvn/Rtree/setup.py'"'"'; __file
__='"'"'/tmp/pip-install-dgw70zvn/Rtree/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __f
ile__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-dgw70zvn/Rtree/pip-egg-info
         cwd: /tmp/pip-install-dgw70zvn/Rtree/
    Complete output (15 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-dgw70zvn/Rtree/setup.py", line 3, in <module>
        import rtree
      File "/tmp/pip-install-dgw70zvn/Rtree/rtree/__init__.py", line 1, in <module>
        from .index import Rtree
      File "/tmp/pip-install-dgw70zvn/Rtree/rtree/index.py", line 6, in <module>
        from . import core
      File "/tmp/pip-install-dgw70zvn/Rtree/rtree/core.py", line 145, in <module>
        rt.Error_GetLastErrorNum.restype = ctypes.c_int
      File "/home/user/.conda/envs/test_aeronetlib/lib/python3.7/ctypes/__init__.py", line 377, in __getattr__
        func = self.__getitem__(name)
      File "/home/user/.conda/envs/test_aeronetlib/lib/python3.7/ctypes/__init__.py", line 382, in __getitem__
        func = self._FuncPtr((name_or_ordinal, self))
    AttributeError: /home/.conda/envs/test_aeronetlib/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 had success installing rtree via conda install -c conda-forge rtree.

Then another error occur:

from aeronet.converters.split import split
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/user/.conda/envs/test_aeronetlib/lib/python3.7/site-packages/aeronet/converters/split.py", line 4, in <module>
    from ..dataset import BandCollection
  File "/home/user/.conda/envs/test_aeronetlib/lib/python3.7/site-packages/aeronet/dataset/__init__.py", line 11, in <module>
    from .io import Predictor
  File "/home/user/.conda/envs/test_aeronetlib/lib/python3.7/site-packages/aeronet/dataset/io.py", line 3, in <module>
    from tqdm import tqdm
ModuleNotFoundError: No module named 'tqdm'

tqdm installs successfully using pip or conda.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions