Closed JDtroles closed 11 months ago
@JDtroles thanks for raising this issue. I believe that it comes from this issue with detectron2: https://github.com/facebookresearch/detectron2/issues/5010
In short, the newest Pillow (10.0.0) seems to be causing problems because LINEAR
no longer is equated to BILINEAR
. Based on the above linked issue it should be fixed very soon so I will not implement a work around on this repo.
If things are urgent, a temporary solution would be to pin the previous version of Pillow when installing detectron2:
First clone locally:
git clone https://github.com/facebookresearch/detectron2.git
cd detectron2
Then edit the setup.py
to fix the detectron2 version:
# other bits of setup script...
setup(
# other setup instructions
install_requires=[
[...]
"Pillow==9.5.0", # Replacing "Pillow>=7.1" which attempts to get the latest version
# other dependencies...
],
)
Then install the package located in the current directory
pip install .
Then, assuming the other dependencies are correctly set up, you should be able to install detectree2 with the usual method:
cd ..
pip install git+https://github.com/PatBall1/detectree2.git
Please let me know if you have any questions or other thoughts.
@PatBall1 thank you for the really fast answer! It fixed the issue with Pillow. Sadly I am now running into another issue:
ERROR 1: PROJ: proj_create_from_database: /home/usr/anaconda3/envs/env-name/share/proj/proj.db lacks DATABASE.LAYOUT.VERSION.MAJOR / DATABASE.LAYOUT.VERSION.MINOR metadata. It comes from another PROJ installation.
But probably I will just wait for the fix in detectron. Or is this totally unrelated?
Thanks again!
@JDtroles this seems to be a different issue deriving from a conflict with your installed version of the PROJ library. This problem usually arises when there are multiple versions of PROJ installed in your environment and the system is using an incompatible or incorrect version.
Here are steps to troubleshoot this problem:
proj
The version of the PROJ library should be displayed.
which proj
This will return the path where proj
is installed.
sudo find / -name "proj.db"
This will return all paths where proj.db
is located. If you see multiple paths, that means you have multiple versions of the PROJ library installed. If you're using conda, you should see a path similar to /home/usr/anaconda3/envs/env-name/share/proj/proj.db
.
conda
or pip
to update the PROJ library, depending on how you installed it.For conda:
conda install -c conda-forge proj
For pip:
pip install --upgrade pyproj
PROJ_LIB
environment variable to point to the correct proj.db
path.export PROJ_LIB=/path/to/proj.db
Replace /path/to/proj.db
with the correct path you found earlier.
Note that this command will only set the PROJ_LIB
variable for the current session. If you open a new terminal window or restart your computer, you will have to set it again. To set it permanently, you can add the command to your shell's startup script (like ~/.bashrc
or ~/.bash_profile
for bash).
You'll need to restart your terminal or source your bash file (source ~/.bashrc
) after exporting the variable. Please let me know how you get on.
throws Error:
Help is greatly appreciated.
Thank you for your work!