bwinkel / pycraf

pycraf is a package that provides functions and procedures for various tasks in spectrum-management compatibility studies.
35 stars 15 forks source link

Pycraf and Python 3.8 #45

Closed cbowers1020 closed 3 years ago

cbowers1020 commented 3 years ago

When I attempted to install Pycraf in my Python 3.8 conda environment via: conda install pycraf

I receive the following error:

Specifications:

  - pycraf -> python[version='>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']

Your python: python=3.8

It appears Pycraf is not compatible with Python 3.8? On the install page it indicates 3.7 or later

bwinkel commented 3 years ago

Which platform are you working on? pycraf conda packages are available for python 3.7-3.9 on Windows and Linux, but on MacOS, I could only get 3.6-3.7 to work. 😢

cbowers1020 commented 3 years ago

Ah, that would be why. I am using MacOS.

I have tried with pip, but I get this error, so I tried conda:

gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/calebbowers/opt/anaconda3/envs/py38/include -arch x86_64 -I/Users/calebbowers/opt/anaconda3/envs/py38/include -arch x86_64 -I/Users/calebbowers/opt/anaconda3/envs/py38/lib/python3.8/site-packages/numpy/core/include -I/Users/calebbowers/opt/anaconda3/envs/py38/include/python3.8 -c pycraf/pathprof/cyimt.c -o build/temp.macosx-10.9-x86_64-3.8/pycraf/pathprof/cyimt.o -O3 -mmacosx-version-min=10.7 -fopenmp=libomp -Wp,-w -Wno-unused-function -Wp,-w -Wno-unused-function -Wp,-w -Wno-unused-function
    clang: error: unsupported argument 'libomp' to option 'fopenmp='
    error: command 'gcc' failed with exit status 1

I have tried installing llvm in conda, but that has not fixed it either.

bwinkel commented 3 years ago

Yes, have a look at the manual, if you want to try to install from source (which is what pip would be doing). The vanilla compiler on MacOS (clang), unfortunately, doesn't come with OpenMP, which is the reason for all the trouble.

cbowers1020 commented 3 years ago

Ah, I was attempting to install libomp rather than openmp via conda...my apologies. I can close this.

bwinkel commented 3 years ago

By-the-way, on newer conda installations, you can install the proper compilers via conda, as well. For building the packages, I do something like

conda install -c conda-forge clang_osx-64 clangxx_osx-64 llvm-openmp openmp cctools==921 ld64==409.12

Maybe this helps...

cbowers1020 commented 3 years ago

I will try that out--thanks!

cbowers1020 commented 3 years ago

When i attempt to install the above, I get:

Downloading and Extracting Packages
nomkl-2.0            | 3 KB      | ################################################################################################################################################################################################################# | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR: This cross-compiler package contains no program /Users/calebbowers/opt/anaconda3/envs/py38/bin/x86_64-apple-darwin13.4.0-clang++
ERROR: deactivate_clangxx_osx-64.sh failed, see above for details
ERROR: This cross-compiler package contains no program /Users/calebbowers/opt/anaconda3/envs/py38/bin/x86_64-apple-darwin13.4.0-clang
ERROR: deactivate_clang_osx-64.sh failed, see above for details
ERROR: This cross-compiler package contains no program /Users/calebbowers/opt/anaconda3/envs/py38/bin/x86_64-apple-darwin13.4.0-clang
ERROR: activate_clang_osx-64.sh failed, see above for details
ERROR: This cross-compiler package contains no program /Users/calebbowers/opt/anaconda3/envs/py38/bin/x86_64-apple-darwin13.4.0-clang++
ERROR: activate_clangxx_osx-64.sh failed, see above for details

And, there are no more details "above"

bwinkel commented 3 years ago

Unfortunately, I have no clue. I don't own a MacOS machine, which is also why, I couldn't figure out, how to create the conda packages. I'll try from time to time. Perhaps, it will be fixed after some upstream changes in the conda toolchain...