Closed gersmit closed 3 years ago
Hi Ger, thanks for your report. It seems to me you are struggling with different incompatible package versions. The proj version you have installed is too old and cannot be used with a recent pyproj module. So the choices you have is to install a newer proj version or to install an older pyproj version. In addition you mention satpy, but you don't mention its version or how you obtained it (is it part of raspbian/debian or did you use pip or conda or ...). This is another thing to be considerd here. Without this information it is hard to help you.
Looking at https://github.com/pytroll/satpy/blob/main/setup.py I see that satpy requires 'pyproj>=2.2' On https://pyproj4.github.io/pyproj/stable/history.html you can see that this pyproj version has a minimum PROJ version of 6.1.0. So a recent satpy module cannot be used together with proj version is 4.9.3 as you have installed now. My recommendation would be to first try to update the proj library, or re-install it using a (much) newer version.
There are some instructions for building PROJ from source on Raspbian here: https://github.com/piwheels/packages/issues/60. Also, feel free to comment on that issue if you would like to see wheels.
Also, the version compatibility matrix is likely a helpful resource: https://pyproj4.github.io/pyproj/stable/installation.html#installing-from-source
Thanks for the quick responses, it all sounds good and strange that I haven't had any problems in previous situations.
I made a new sdcard for the Raspberry Pi with a x64 Buster image.
Now how can I best proceed to install proj, pyproj and satpy. I can install Satpy with pip or conda but also see that RPI has it as software as "Python Package for earth-observing satellite data processing Python3-satpy-0.11.1-2". I've never used this one.
I hope you can help me, possible is there an easy way (wget or something) to install proj/pyproj, my RPI program knowledge is there but should not go too deep.
The attachement is what RPI also has inside as PROJ software. I dont't no if i can use that.
@gersmit These all look like very old versions of these software libraries including Satpy. I think you should install Python (3.7 or greater) and then use traditional Python tools like pip (or conda is you install python that way). The nice thing about using conda (conda-forge) is that all of the binary dependencies are built for you (like the PROJ C library).
@djhoese , I already had a little bit of that. Didn't know Raspbian was carrying this either.
I'm using Python 3.7 but don't really know how to install proj. I find this : https://qiita.com/XPT60/items/be4e3d9f9f58d17cf968. Translated from Japanese, the explanation is understandable to me, but is this what I should have in combination with Satpy?
I will install conda tomorrow and again follow the way you described. If it works for someone else, it should work for me too....yes, right
@gersmit you can try downloading, unzipping and installing this wheel: pyproj-2.4.1-cp37-cp37m-linux_armv7l.whl.zip
I make install like @snowman2 explain, pyproj 2.4.1
I update & upgrade etc
I install Satpy 0.29.0 with pip3
Get error:
Traceback (most recent call last):
File "/home/pi/a-satpy-testen/cursus2_seviri.py", line 105, in
What is happening now and can i solved this? This is the example from
Looks like numpy isn't installed correctly.
I wonder if this will help: https://github.com/piwheels/packages/issues/60#issuecomment-554965331
Made new image RPI Buster x32. Install fresh pip install satpy and get error during install
scm_config
use_scm_version={
File "/tmp/easy_install-O_reoh/setuptools_scm-6.0.1/src/setuptools_scm/init.py", line 8, in
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-EPnzAQ/zarr/
I don't no anymore what i have to do first
Seems like a python version issue.
I recommend making a virtual environment:
python3 -m venv venv
. venv/bin/activate
python -m pip install -U pip
python -m pip install scipy
@snowman2 sorry but no result, install stops on the same row. The img on the RPI is totally clean Is it maybe beter to install first the Satpy prerequisites, and what are these?
I installed the same almost 1 year ago on RPI4-4GB, no problems That is working til now Version 0.23.0 (2020/09/18), pyproj 1.9.6, proj 0.1.0.
Now i try it on a clean Buster x64 and clean Buster x32 on RPI 3b with the problems
Are you able to generate a requirements.txt using pip freeze from the old environment? That might help you re-create one in a new environment.
Step by step i am going. Later i explane what i have done. The reader is trying to start but get error--> missing FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/pyspectral/etc/pyspectral.yaml' Is it possible to install this?
The error complete = :
MSG4-SEVI-MSG15-0100-NA-20210807142743.311000000Z-NA.nat
{'seviri_l1b_native': ['MSG4-SEVI-MSG15-0100-NA-20210807142743.311000000Z-NA.nat']}
Traceback (most recent call last):
File "/home/pi/a-satpy-testen/cursus_seviri.py", line 76, in
This is a config file that comes with the pyspectral package. It should be included when you install the package. How did you install satpy/pyspectral?
pip3 install pyspectral
I notice that your traceback bounces between python packages in /home/pi/.local
and then looks at pyspectral in /usr/lib/python3
. Would it be possible for you to make sure you install all new packages in /home/pi/.local
? You may be using an old version of pyspectral or are installing it at the system level when you have all the other libraries installed in your user directory.
pip3 install pyspectral
should work, but since it didn't let's start with putting it in /home/pi/.local
like you did the other packages. You should be able to do that by doing pip3 install --user pyspectral
.
Question: On the working RPI i find '/usr/lib/python3/site-packages/pyspectral/etc/pyspectral.yaml' Why is asking the new RPI '/usr/lib/python3/dist-packages/pyspectral/etc/pyspectral.yaml'
Not sure. It mind depend on what version of python or how python was installed on the system level. Does /usr/lib/python3/dist-packages/
exist on the new RPI? Either way, you should try following @snowman2's suggestion that he linked to above about creating a virtual environment.
I use suggestie @snowman2 ----> (venv) pi@raspberrypi:~ $ /usr/lib/python3/dist-packages/ exist on the new RPI ERROR stay: FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/pyspectral/etc/pyspectral.yaml' DIR 'pyspectral 'has no dir 'etc'
Did you do the pip3
install before or after activating the venv?
pip3 install pyspectral
should have put the pyspectral package in your venv, not in the system /usr/lib
directory. :confused:
small question: It is starting to run and have to ugrade pyresample
ERROR: Command errored out with exit status 1: command: /usr/bin/python3 /home/pi/.local/lib/python3.5/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp2ltorcw9 cwd: /tmp/pip-install-s8je6qez/pyproj_457c6b5ae5fc4ba997045117a2ba9858 Complete output (1 lines): ERROR: Minimum supported proj version is 6.2.0, installed version is 4.9.3. For more information see: https://pyproj4.github.io/pyproj/stable/installation.html
I try to install proj 6.2.0 Then
cd proj
mkdir build
cd build
cmake ..
cmake --build .
pi@raspberrypi:~/proj/build $ cmake --build . make: *** Geen doelen opgegeven en geen Makefile gevonden. Gestopt.
How do i use the last row cmake --build . . I don't know how to deal with this
@gersmit, with the wheel https://github.com/pyproj4/pyproj/issues/893#issuecomment-895548598, you don't need to install PROJ, correct?
@snowman2 , new img dd 13-8-2021, 18:00 hr, RPI buster X64 pi@raspberrypi:~/Downloads $ cat /proc/cpuinfo processor : 0 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 44.80 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4
processor : 1 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 44.80 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4
processor : 2 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 44.80 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4
processor : 3 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 44.80 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4
Hardware : BCM2835 Revision : a02082 Serial : 00000000a0bb581a Model : Raspberry Pi 3 Model B Rev 1.2 pi@raspberrypi:~/Downloads $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" pi@raspberrypi:~/Downloads $ cat /sys/firmware/devicetree/base/model Raspberry Pi 3 Model B Rev 1.2pi@raspberrypi:~/Downloads $
pi@raspberrypi:~/Downloads $ sudo pip install pyproj-2.4.1-cp37-cp37m-linux_armv7l.whl pyproj-2.4.1-cp37-cp37m-linux_armv7l.whl is not a supported wheel on this platfor
install satpy Installing build dependencies ... done Complete output from command python setup.py egg_info: Proj executable not found. Please set PROJ_DIR variable.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-CbGDI3/pyproj/
it can't and shouldn't be that hard. What the hell am I doing wrong. Whereas before there were no problems at all. I can still try with Stretch. This will be difficult for the amateur. help me
stops on
Does this work for you? https://github.com/piwheels/packages/issues/60#issuecomment-554843244
@snowman2 get ssh error
pi@raspberrypi:~ $ git clone git@github.com:pyproj4/pyproj.git Cloning into 'pyproj'... git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Maybe https might work better for you:
git clone https://github.com/pyproj4/pyproj.git
Hi @snowman2 , What have i to do to install the pyproj.git to make it running?
Base on: https://github.com/piwheels/packages/issues/60#issuecomment-554843244
I am thinking you will likely have more success if you do this:
mkdir -p ~/projects/sqlite
wget https://www.sqlite.org/2018/sqlite-autoconf-3240000.tar.gz
mv sqlite-autoconf-3240000.tar.gz projects/sqlite/
cd ~/projects/sqlite/
tar xf sqlite-autoconf-3240000.tar.gz
cd sqlite-autoconf-3240000/
./configure
make
make install
cd $HOME
export PROJ_DIR=$HOME/projects/proj
mkdir -p $PROJ_DIR
wget https://github.com/pyproj4/pyproj/archive/refs/tags/v2.6.1rel.tar.gz
tar xf v2.6.1rel.tar.gz
cd pyproj-2.6.1rel/
bash ci/travis/proj-dl-and-compile 6.3.2
python setup.py install
@snowman2, I installed as you explane.
At the end error -->
root@raspberrypi:~/pyproj-2.6.1rel# python setup.py install
Traceback (most recent call last):
File "setup.py", line 219, in
Then when i try to install Satpy again an Error And i cannot see that a Python 3.7 dir is installed in dir /home/pi/.local/lib
ERROR: Command errored out with exit status 1: /usr/bin/python /home/pi/.local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpGUVTul Check the logs for full command output.
Why is it difficult now to install and for a couple of months ago easy?
https://github.com/pyproj4/pyproj/issues/893#issuecomment-896190980
You need python 3. A virtual environment is best :point_up:
I think this is your best bet for this to be easier in the future: https://github.com/piwheels/packages/issues/60
@snowman2 , Thanks for all the help. I am busy now with installing. After this i make a new image, can you tell me what is the best order of work to install Satpy good
Installing pyproj (and maybe rasterio
) should be the hardest parts of install Satpy hopefully. The rest of the dependencies are relatively simple compared to pyproj and rasterio. As long as you use a virtualenv with Python 3.7+ and follow @snowman2's instructions for installing pyproj then the rest of this shouldn't be too bad (pip install satpy
). It seems like so far it has just been difficult to get your build to keep using Python 3.
Small question: is there a list for for example what is channel C2 --> IR_039 ? etcetera
This is a Satpy specific question and if you have more they should maybe go on the satpy repository (so we can stop bugging Alan). As for the answer: It all depends on the sensor you are talking about. Are you saying C2 as in Channel 2 of the SEVIRI instrument or are you saying C02 as in the ABI Channel 2 band data provided by Satpy. You can typically google something like "
Glad to hear that you have pyproj installed. Going to close this issue since it is resolved. I recommend asking satpy questions in their recommended channels.
Dear sir or madam, My name is Ger Smit from the Netherlands. I have problem with pyproj / proj. I use Raspberry Pi, Python, for making screne from data with satpy. No problems til now. I install satpy, try to run python script and get error. I I was in contact with @djhoese about this and he referred me to you ERROR: Minimum supported proj version is 6.2.0, installed version is 4.9.3. For more information see: https://pyproj4.github.io/pyproj/stable/installation.htm
Then when i run the script i get error :
Traceback (most recent call last): File "/home/pi/a-satpy-testen/cursus_seviri.py", line 83, in
scn.load(scn.all_dataset_names()[1:]) #HEEL belangrijk
File "/home/pi/.local/lib/python3.7/site-packages/satpy/scene.py", line 1163, in load
self._read_datasets_from_storage(kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/satpy/scene.py", line 1183, in _read_datasets_from_storage
return self._read_dataset_nodes_from_storage(nodes, kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/satpy/scene.py", line 1189, in _read_dataset_nodes_from_storage
loaded_datasets = self._load_datasets_by_readers(reader_datasets, kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/satpy/scene.py", line 1214, in _load_datasets_by_readers
new_datasets = reader_instance.load(ds_ids, kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/satpy/readers/yaml_reader.py", line 945, in load
ds = self._load_dataset_with_area(dsid, coords, kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/satpy/readers/yaml_reader.py", line 1109, in _load_dataset_with_area
ds = super(GEOFlippableFileYAMLReader, self)._load_dataset_with_area(dsid, coords, kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/satpy/readers/yaml_reader.py", line 841, in _load_dataset_with_area
ds = self._load_dataset_data(file_handlers, dsid, kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/satpy/readers/yaml_reader.py", line 713, in _load_dataset_data
proj = self._load_dataset(dsid, ds_info, file_handlers, kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/satpy/readers/yaml_reader.py", line 689, in _load_dataset
projectable = fh.get_dataset(dsid, ds_info)
File "/home/pi/.local/lib/python3.7/site-packages/satpy/readers/seviri_l1b_native.py", line 458, in get_dataset
self._update_attrs(dataset, dataset_info)
File "/home/pi/.local/lib/python3.7/site-packages/satpy/readers/seviri_l1b_native.py", line 582, in _update_attrs
actual_lon, actual_lat, actual_alt = self.satpos
File "/home/pi/.local/lib/python3.7/site-packages/satpy/readers/seviri_l1b_native.py", line 610, in satpos
semi_minor_axis=self.mda['projection_parameters']['b']
File "/home/pi/.local/lib/python3.7/site-packages/satpy/readers/seviri_base.py", line 703, in get_satpos
proj='geocent', a=semi_major_axis, b=semi_minor_axis, units='m'
File "/home/pi/.local/lib/python3.7/site-packages/pyproj/crs.py", line 436, in init
super(CRS, self).init(projstring)
File "pyproj/_crs.pyx", line 1738, in pyproj._crs._CRS.init
pyproj.exceptions.CRSError: Invalid projection: +proj=geocent +a=6378169.0 +b=6356583.800000001 +units=m +type=crs: (Internal Proj Error: proj_create: Invalid b value)
Please can you explaine to me how to install or solved pyproj / proj in combination with satpy. I try a lot withoud result.
Thanks in advange @gersmit