Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"conda env create" crashes for MacOS + python 3.10, 3.11 #103

Closed
giardiaspace opened this issue Apr 26, 2023 · 2 comments · Fixed by spacetelescope/stcal#164 or spacetelescope/jwst#7570
Assignees
Labels
bug Something isn't working

Comments

@giardiaspace
Copy link

When I try to create the stenv environment, conda crashes.

Steps that can reproduce the error:

  1. curl -L "https://github.com/spacetelescope/stenv/releases/download/2023.04.14/stenv-macOS-py3.11-2023.04.05.yaml" -o ~/.conda/stenv-macOS-py3.11-2023.04.05.yaml
  2. conda env create --file ~/.conda/stenv-macOS-py3.11-2023.04.05.yaml --name stenv
  3. Here is a partial error output from the resulting crash:
Failed to build opencv-python
  Building wheel for opencv-python (pyproject.toml) did not run successfully.
        CMake's 'find_host_package(PythonInterp 2.7)' found wrong Python version:
      
        PYTHON_EXECUTABLE=/Users/mikewong/opt/anaconda3/envs/stenv/bin/python
      
        PYTHON_VERSION_STRING=3.11.3
      
        Consider providing the 'PYTHON2_EXECUTABLE' variable via CMake command line
        or environment variables
      
      [  0%] Built target opencv_dnn_plugins
      [  0%] Built target opencv_highgui_plugins
      [  0%] Building ASM_NASM object 3rdparty/libjpeg-turbo/src/simd/CMakeFiles/jsimd.dir/x86_64/jsimdcpu.asm.o
      nasm: error: unable to find utility "nasm", not a developer tool or in PATH
      make[2]: *** [3rdparty/libjpeg-turbo/src/simd/CMakeFiles/jsimd.dir/x86_64/jsimdcpu.asm.o] Error 72
      make[1]: *** [3rdparty/libjpeg-turbo/src/simd/CMakeFiles/jsimd.dir/all] Error 2
      make: *** [all] Error 2
      Traceback (most recent call last):

      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for opencv-python
  ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects

Hardware/software info if relevant:
Model Name: Mac Pro
Model Identifier: MacPro5,1
Processor Name: Quad-Core Intel Xeon
System Version: macOS 10.14.6 (18G9323)
Kernel Version: Darwin 18.7.0
conda version : 22.9.0

Could this relate to opencv-python not supporting builds in Mac OS 10.x any more? See "Backward compatibility" here and this issue thread.

I tried to insteall with python 3.10 instead of 3.11, and set opencv-python==4.6.0.66 in the yaml, but pip again crashed trying to install opencv-python.

Is there any way you could modify dependencies to use opencv-python-headless instead? I ask because this command works fine:

conda install opencv-python-headless=4.7.0.72 -n stenv -c fastai

@zacharyburnett
Copy link
Collaborator

zacharyburnett commented Apr 28, 2023

We've tested opencv-python-headless in the step code, and it should work well according to the tests. You should see this change in the next set of releases of stcal and jwst; I will make sure to make another stenv release as well including this

@giardiaspace
Copy link
Author

giardiaspace commented Apr 28, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants