mshumko / asilib

An open source package providing data access and analysis tools for the world's all-sky imager (ASI) data.
https://aurora-asi-lib.readthedocs.io/
GNU General Public License v3.0
10 stars 4 forks source link

BUG: Cannot uninstall opencv-python 4.6.0, RECORD file not found. Hint: The package was installed by conda. #14

Closed rmcgranaghan closed 1 year ago

rmcgranaghan commented 1 year ago

Describe the issue:

It seems installation in a cloud environment (using HelioCloud) has an issue related to how opencv is installed. The package attempts to install it, but it does not recognize the package already installed by conda.

Reproduce the code example:

import os

os.system("pip install aurora-asi-lib")

Error message:

Collecting aurora-asi-lib
  Using cached aurora_asi_lib-0.20.1-py3-none-any.whl (3.4 MB)
Collecting opencv-python<5.0,>=4.8.0
  Using cached opencv_python-4.8.1.78-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (61.7 MB)
Requirement already satisfied: numpy in /srv/conda/envs/notebook/lib/python3.10/site-packages (from aurora-asi-lib) (1.23.5)
Requirement already satisfied: requests in /srv/conda/envs/notebook/lib/python3.10/site-packages (from aurora-asi-lib) (2.28.1)
Collecting ffmpeg-python
  Using cached ffmpeg_python-0.2.0-py3-none-any.whl (25 kB)
Requirement already satisfied: scipy in /srv/conda/envs/notebook/lib/python3.10/site-packages (from aurora-asi-lib) (1.9.3)
Collecting matplotlib<4.0,>=3.7
  Using cached matplotlib-3.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.6 MB)
Requirement already satisfied: cdflib>=0.3.20 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from aurora-asi-lib) (0.4.9)
Requirement already satisfied: pyshp in /srv/conda/envs/notebook/lib/python3.10/site-packages (from aurora-asi-lib) (2.3.1)
Requirement already satisfied: rego-imager-readfile<2.0,>=1.2.0 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from aurora-asi-lib) (1.2.2)
Collecting trex-imager-readfile<2.0,>=1.4.4
  Using cached trex_imager_readfile-1.5.1-py3-none-any.whl (15 kB)
Requirement already satisfied: beautifulsoup4 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from aurora-asi-lib) (4.11.1)
Requirement already satisfied: aacgmv2 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from aurora-asi-lib) (2.6.2)
Requirement already satisfied: themis-imager-readfile<2.0,>=1.2.1 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from aurora-asi-lib) (1.3.0)
Requirement already satisfied: wheel in /srv/conda/envs/notebook/lib/python3.10/site-packages (from aurora-asi-lib) (0.38.4)
Requirement already satisfied: pymap3d in /srv/conda/envs/notebook/lib/python3.10/site-packages (from aurora-asi-lib) (3.0.1)
Requirement already satisfied: pandas in /srv/conda/envs/notebook/lib/python3.10/site-packages (from aurora-asi-lib) (1.5.2)
Requirement already satisfied: kiwisolver>=1.0.1 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from matplotlib<4.0,>=3.7->aurora-asi-lib) (1.4.4)
Requirement already satisfied: contourpy>=1.0.1 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from matplotlib<4.0,>=3.7->aurora-asi-lib) (1.0.6)
Requirement already satisfied: packaging>=20.0 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from matplotlib<4.0,>=3.7->aurora-asi-lib) (21.3)
Requirement already satisfied: python-dateutil>=2.7 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from matplotlib<4.0,>=3.7->aurora-asi-lib) (2.8.2)
Requirement already satisfied: cycler>=0.10 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from matplotlib<4.0,>=3.7->aurora-asi-lib) (0.11.0)
Requirement already satisfied: pyparsing>=2.3.1 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from matplotlib<4.0,>=3.7->aurora-asi-lib) (3.0.9)
Requirement already satisfied: pillow>=6.2.0 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from matplotlib<4.0,>=3.7->aurora-asi-lib) (9.2.0)
Requirement already satisfied: fonttools>=4.22.0 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from matplotlib<4.0,>=3.7->aurora-asi-lib) (4.38.0)
Requirement already satisfied: h5py<4.0.0,>=3.1.0 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from trex-imager-readfile<2.0,>=1.4.4->aurora-asi-lib) (3.7.0)
Requirement already satisfied: soupsieve>1.2 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from beautifulsoup4->aurora-asi-lib) (2.3.2.post1)
Requirement already satisfied: future in /srv/conda/envs/notebook/lib/python3.10/site-packages (from ffmpeg-python->aurora-asi-lib) (0.18.2)
Requirement already satisfied: pytz>=2020.1 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from pandas->aurora-asi-lib) (2022.6)
Requirement already satisfied: certifi>=2017.4.17 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from requests->aurora-asi-lib) (2023.5.7)
Requirement already satisfied: charset-normalizer<3,>=2 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from requests->aurora-asi-lib) (2.1.1)
Requirement already satisfied: idna<4,>=2.5 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from requests->aurora-asi-lib) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from requests->aurora-asi-lib) (1.26.11)
Requirement already satisfied: six>=1.5 in /srv/conda/envs/notebook/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib<4.0,>=3.7->aurora-asi-lib) (1.16.0)
Installing collected packages: opencv-python, ffmpeg-python, trex-imager-readfile, matplotlib, aurora-asi-lib
  Attempting uninstall: opencv-python
    Found existing installation: opencv-python 4.6.0

ERROR: Cannot uninstall opencv-python 4.6.0, RECORD file not found. Hint: The package was installed by conda.

Runtime information:

print(sys.version) 3.10.8 | packaged by conda-forge | (main, Nov 22 2022, 08:23:14) [GCC 10.4.0]


print(platform.platform()) Linux-5.4.238-148.346.amzn2.x86_64-x86_64-with-glibc2.35

Context for the issue:

No response

mshumko commented 1 year ago

I'm sorry that you ran into this issue! The TREx data loader needs opencv-python version >=4.8.0, as that version includes a fix for a SegmentationFault. HelioCloud has version 4.6.0 installed, which is incompatible with asilib (hence it tried to update it).

Can you try to update opencv-python in conda to version 4.8.0 (or newer), and then try to install aurora-asi-lib again?

rmcgranaghan commented 1 year ago

thanks! To upgrade it tries to first uninstall opencv-python 4.6, which hits some permissions error (I think) in heliocloud

"ERROR: Cannot uninstall opencv-python 4.6.0"

Might be an issue I need to check with heliocloud group

mshumko commented 1 year ago

Just confirming, did you try to update opencv-python using the conda update command? If so, then I agree that this problem is best addressed by the HelioCloud group.

rmcgranaghan commented 1 year ago

thanks for following up. That is correct.