kconnour / pyRT_DISORT

A Python package for helping to compute input arrays to DISORT.
https://kconnour.github.io/pyRT_DISORT/
BSD 3-Clause "New" or "Revised" License
15 stars 5 forks source link

MacOS installation #2

Closed kconnour closed 2 months ago

kconnour commented 3 years ago

I've tested the installation on Ubuntu 20.10 and MacOS Catalina 10.15.7 and it works.

It failed on macOS 11.2.3 build 20D91. It fails to build the .so file but doesn't create an error.

mjwolff commented 3 years ago

work around for Big Sur:

this will not compile the fortran code, but will set things up

pip -install .

execute this command (it will compile the fortran, but it will not create the needed shared library by itself

python -m setup.py

right above the usage statement (which is probably diagnostic of the problem, but i give up), you will see the fortran link command. copy and paste to the command line like so (assuming that you are in the installation directory):

/usr/local/bin/gfortran -Wall -g -Wall -g -undefined dynamic_lookup -bundle /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/src.macosx-11.3-x86_64-3.9/disortmodule.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/src.macosx-11.3-x86_64-3.9/fortranobject.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmpoy4pcd_5.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/BDREF.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/DISOBRDF.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/ERRPACK.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/LAPACK.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/LINPAK.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/RDI1MACH.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/src.macosx-11.3-x86_64-3.9/disort-f2pywrappers.o -L/usr/local/lib/gcc/x86_64-apple-darwin19/10.2.0 -L/usr/local/lib/gcc/x86_64-apple-darwin19/10.2.0/../../.. -L/usr/local/lib/gcc/x86_64-apple-darwin19/10.2.0/../../.. -lgfortran -o ./disort.cpython-39-darwin.so

now run the install command again, it should move the shared library to the desired site-packages location.

pip install .


[elvis:lib/python3.9/site-packages] mwolff% ls -al | grep disort
-rwxr-xr-x    1 mwolff  staff  977528 Aug  8 10:35 disort.cpython-39-darwin.so

Successfully installed pyRT-DISORT-0.0.3
(vpyrt) [elvis:rt/disort/pyRT_DISORT] mwolff% python
Python 3.9.5 (default, May  7 2021, 21:28:16) 
[Clang 12.0.5 (clang-1205.0.22.9)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import disort
>>> 
kconnour commented 2 years ago

Can you remind me, does this issue happen when executing python -m pip install .? I find that works but I got the same error on Ubuntu when using python setup.py. I don't know what -m would do if no module is provided.

mjwolff commented 2 years ago

I don’t recall it working properly in either version. Basically, I have to cut-and-based the link command from the screen back to the terminal, which creates the library. Running the install command then seems to put it in the right place.

On Feb 26, 2022, at 6:46 PM, kconnour @.**@.>> wrote:

Can you remind me, does this issue happen when executing python -m pip install .? I find that works but I got the same error on Ubuntu when using python setup.py. I don't know what -m would do if no module is provided.

— Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkconnour%2FpyRT_DISORT%2Fissues%2F2%23issuecomment-1052372560&data=04%7C01%7Cmjwolff%40spacescience.org%7C47b7dd2adeed4e07437308d9f94fed61%7C3461589e91624c2e8e5b764489129af6%7C1%7C0%7C637814943976394162%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=iYcxoZ3pwBz%2Blgvqn83edFn%2Bfodc2h5m2uwdHlFumPw%3D&reserved=0, or unsubscribehttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAKXHPB46E5SHXXXFVIWY2DU5EGXRANCNFSM43TYU7AA&data=04%7C01%7Cmjwolff%40spacescience.org%7C47b7dd2adeed4e07437308d9f94fed61%7C3461589e91624c2e8e5b764489129af6%7C1%7C0%7C637814943976394162%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=DWUNyTOhzbpXSOmWIbtMGezPkSQdgyQZjY7KgJ5yY0I%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Cmjwolff%40spacescience.org%7C47b7dd2adeed4e07437308d9f94fed61%7C3461589e91624c2e8e5b764489129af6%7C1%7C0%7C637814943976394162%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=w4LVIgNMFwrR%2BQyJGj3LUjLfdOTEV0%2FQeFKERcOYQyo%3D&reserved=0 or Androidhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Cmjwolff%40spacescience.org%7C47b7dd2adeed4e07437308d9f94fed61%7C3461589e91624c2e8e5b764489129af6%7C1%7C0%7C637814943976394162%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=DvxHk4Aby4hdAIUZbBKRawH3KyPPvkwCwAK8IQhP1QU%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

mjwolff commented 2 years ago

here is some diagnostic output (install.log attached). #14

(vpyrt) mwolff@taus:~/test/pyRT_DISORT$ gfortran -v Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:hsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-yTrUTS/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04) (vpyrt) mwolff@taus:~/test/pyRT_DISORT$ python3 -m setup.py > install.log 2>&1

install.log

YLeseigneur commented 7 months ago

Hi,

I have quite the same issue on my Mac (12.2 Monterey).

After using pip install . and trying in python to import pyrt I got this error: ImportError: dlopen(/Users/yleseign/miniconda3/envs/MIRS/lib/python3.10/site-packages/disort.so, 0x0002): tried: '/Users/yleseign/miniconda3/envs/MIRS/lib/python3.10/site-packages/disort.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/disort.so' (no such file), '/usr/lib/disort.so' (no such file)

Then, I tried to follow your lines @mjwolff (see below), but I do not have a /var/folders/ft folder, only: /02, /ny or /zz. Do you know why? Could this be due to the way I have installed gfortran? (from binary files as explained here: https://github.com/fxcoudert/gfortran-for-macOS/releases).

work around for Big Sur:

this will not compile the fortran code, but will set things up

pip -install .

execute this command (it will compile the fortran, but it will not create the needed shared library by itself

python -m setup.py

right above the usage statement (which is probably diagnostic of the problem, but i give up), you will see the fortran link command. copy and paste to the command line like so (assuming that you are in the installation directory):

/usr/local/bin/gfortran -Wall -g -Wall -g -undefined dynamic_lookup -bundle /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/src.macosx-11.3-x86_64-3.9/disortmodule.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/src.macosx-11.3-x86_64-3.9/fortranobject.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmpoy4pcd_5.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/BDREF.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/DISOBRDF.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/ERRPACK.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/LAPACK.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/LINPAK.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/RDI1MACH.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/src.macosx-11.3-x86_64-3.9/disort-f2pywrappers.o -L/usr/local/lib/gcc/x86_64-apple-darwin19/10.2.0 -L/usr/local/lib/gcc/x86_64-apple-darwin19/10.2.0/../../.. -L/usr/local/lib/gcc/x86_64-apple-darwin19/10.2.0/../../.. -lgfortran -o ./disort.cpython-39-darwin.so

now run the install command again, it should move the shared library to the desired site-packages location.

pip install .


[elvis:lib/python3.9/site-packages] mwolff% ls -al | grep disort
-rwxr-xr-x    1 mwolff  staff  977528 Aug  8 10:35 disort.cpython-39-darwin.so

Successfully installed pyRT-DISORT-0.0.3
(vpyrt) [elvis:rt/disort/pyRT_DISORT] mwolff% python
Python 3.9.5 (default, May  7 2021, 21:28:16) 
[Clang 12.0.5 (clang-1205.0.22.9)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import disort
>>> 
mjwolff commented 7 months ago

Salut, Yann,

Utilises-tu quelle version de MacOS?

        —mike

On Mar 7, 2024, at 15:02, Yann Leseigneur @.***> wrote:

Hi,

I have quite the same issue on my Mac (12.2 Monterey).

After using pip install . and trying in python to import pyrt I got this error: ImportError: dlopen(/Users/yleseign/miniconda3/envs/MIRS/lib/python3.10/site-packages/disort.so, 0x0002): tried: '/Users/yleseign/miniconda3/envs/MIRS/lib/python3.10/site-packages/disort.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/disort.so' (no such file), '/usr/lib/disort.so' (no such file)

Then, I tried to follow your lines @mjwolff https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmjwolff&data=05%7C02%7Cmjwolff%40spacescience.org%7C83a852b0595a452f13f908dc3eaf4b64%7C3461589e91624c2e8e5b764489129af6%7C1%7C0%7C638454169850725087%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=obLdkY9z66h0lPnkMW9%2BC%2Fhh%2FxJp5MBgHiZ5VtBevec%3D&reserved=0 (see below), but I do not have a /var/folders/ft folder, only: /02, /ny or /zz. Do you know why? Could this be due to the way I have installed gfortran? (from binary files as explained here: https://github.com/fxcoudert/gfortran-for-macOS/releases https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ffxcoudert%2Fgfortran-for-macOS%2Freleases&data=05%7C02%7Cmjwolff%40spacescience.org%7C83a852b0595a452f13f908dc3eaf4b64%7C3461589e91624c2e8e5b764489129af6%7C1%7C0%7C638454169850734174%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=iUdRzURMuoHfWp45yDUFlzohtw6%2BisjiflY7KmLK%2FMs%3D&reserved=0).

work around for Big Sur:

this will not compile the fortran code, but will set things up

pip -install .

execute this command (it will compile the fortran, but it will not create the needed shared library by itself

python -m setup.py

right above the usage statement (which is probably diagnostic of the problem, but i give up), you will see the fortran link command. copy and paste to the command line like so (assuming that you are in the installation directory):

/usr/local/bin/gfortran -Wall -g -Wall -g -undefined dynamic_lookup -bundle /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/src.macosx-11.3-x86_64-3.9/disortmodule.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/src.macosx-11.3-x86_64-3.9/fortranobject.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmpoy4pcd_5.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/BDREF.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/DISOBRDF.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/ERRPACK.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/LAPACK.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/LINPAK.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/Users/mwolff/src/rt/disort/pyRT_DISORT/disort4.0.99/RDI1MACH.o /var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/var/folders/ft/jtq2d1mn6950klgtpf83szxr0000z9/T/tmphgmoi6co/src.macosx-11.3-x86_64-3.9/disort-f2pywrappers.o -L/usr/local/lib/gcc/x86_64-apple-darwin19/10.2.0 -L/usr/local/lib/gcc/x86_64-apple-darwin19/10.2.0/../../.. -L/usr/local/lib/gcc/x86_64-apple-darwin19/10.2.0/../../.. -lgfortran -o ./disort.cpython-39-darwin.so

now run the install command again, it should move the shared library to the desired site-packages location.

pip install .

[elvis:lib/python3.9/site-packages] mwolff% ls -al | grep disort -rwxr-xr-x 1 mwolff staff 977528 Aug 8 10:35 disort.cpython-39-darwin.so

Successfully installed pyRT-DISORT-0.0.3 (vpyrt) [elvis:rt/disort/pyRT_DISORT] mwolff% python Python 3.9.5 (default, May 7 2021, 21:28:16) [Clang 12.0.5 (clang-1205.0.22.9)] on darwin Type "help", "copyright", "credits" or "license" for more information.

import disort

— Reply to this email directly, view it on GitHub https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkconnour%2FpyRT_DISORT%2Fissues%2F2%23issuecomment-1983571081&data=05%7C02%7Cmjwolff%40spacescience.org%7C83a852b0595a452f13f908dc3eaf4b64%7C3461589e91624c2e8e5b764489129af6%7C1%7C0%7C638454169850747076%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=cLS6HeEX2MNo5Kh2usHfHXZjrz1QzfZXOjAB5rjO8Lo%3D&reserved=0, or unsubscribe https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAKXHPDXSUPQLJMS3SQTVP3YXBXQ3AVCNFSM43TYU7AKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJYGM2TOMJQHAYQ&data=05%7C02%7Cmjwolff%40spacescience.org%7C83a852b0595a452f13f908dc3eaf4b64%7C3461589e91624c2e8e5b764489129af6%7C1%7C0%7C638454169850759099%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=L9thMqGaJqE8j4qtYZhIlc1WyAaufuQFUvGqV8OXFYc%3D&reserved=0. You are receiving this because you were mentioned.

YLeseigneur commented 7 months ago

Salut Mike,

Monterey 12.2.1 (Apple M1)

mjwolff commented 7 months ago

I see that this is being logged, so I will switch to English.

1) Is miniconda a fresh install?

2) I have had this problem for a different install on an m1 machine that I have. With the M1, it seems to allow an option to run in a rosetta mode with x86_64 architecture. From what I can tell, you will want to try to force condo to install natively…with something like:

conda activate native
conda config --env --set subdir osx-arm64

See this thread.

https://stackoverflow.com/questions/65415996/how-to-specify-the-architecture-or-platform-for-a-new-conda-environment-apple How to specify the architecture or platform for a new conda environment? (Apple Silicon) stackoverflow.com

Je serai en Angleterre (pour l’équipe NOMAD) jusqu’au jeudi prochaine, et puis un retour vers Paris. Tu es où au moment? LATMOS?

            —mike

On Mar 7, 2024, at 15:12, Yann Leseigneur @.***> wrote:

Salut Mike,

Monterey 12.2.1 (Apple M1)

— Reply to this email directly, view it on GitHub https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkconnour%2FpyRT_DISORT%2Fissues%2F2%23issuecomment-1983589303&data=05%7C02%7Cmjwolff%40spacescience.org%7Cb0536b4d16f0497b961c08dc3eb0a757%7C3461589e91624c2e8e5b764489129af6%7C1%7C0%7C638454175671082205%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=SsOlS3LIUnzKTsSzBWbdc1fG1g0duQb94Lg1z%2BEtnQE%3D&reserved=0, or unsubscribe https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAKXHPDBXQU2VL7JV76BFA3YXBYVTAVCNFSM43TYU7AKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJYGM2TQOJTGAZQ&data=05%7C02%7Cmjwolff%40spacescience.org%7Cb0536b4d16f0497b961c08dc3eb0a757%7C3461589e91624c2e8e5b764489129af6%7C1%7C0%7C638454175671092085%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=uVe4LunTU%2FHpA1NfkludjPR%2FmZE3CQlxcPV2%2BQHfP3Q%3D&reserved=0. You are receiving this because you were mentioned.

YLeseigneur commented 6 months ago

1) conda version : 4.13.0

2) Oh ok. So I have followed the instructions by recreate a conda env by using: CONDA_SUBDIR=osx-arm64 conda create -n native numpy -c conda-forge And then:

With this protocol, I no longer have the error when I import pyrt, but another one: 1 """The :code:surface module contains structures for creating arrays related to 2 DISORT's surface treatment. 3 """ 4 import numpy as np ----> 5 from disort import disobrdf 8 def make_empty_bemst(n_streams: int) -> np.ndarray: 9 """Make an empty bemst array. 10 11 Parameters (...) 19 20 """

ModuleNotFoundError: No module named 'disort'

Maybe is now the same problem as the issue #14.

There is also an issue when I try to python -m setup.py as you mentioned in your first comments on this issue, I have this error: _Traceback (most recent call last): File "/Users/yleseign/.pyenv/versions/3.9.9/lib/python3.9/runpy.py", line 188, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/Users/yleseign/.pyenv/versions/3.9.9/lib/python3.9/runpy.py", line 111, in _get_module_details import(pkg_name) File "/Users/yleseign/Documents/post_docs/LATMOS_MIRS/codes_MIRS/pyRT_DISORT/setup.py", line 16, in if sys.argv[1] == 'egginfo': IndexError: list index out of range

(Oui je suis au LATMOS maintenant!)

mjwolff commented 6 months ago

Hi Yann,

Is there any chance that you hadn’t activated your env before you tried the import? Are you able to upgrade your OS or is it constrained by LATMOS IT policies?

            —mike

On Mar 7, 2024, at 15:50, Yann Leseigneur @.***> wrote:

conda version : 4.13.0

Oh ok. So I have followed the instructions by recreate a conda env by using: CONDA_SUBDIR=osx-arm64 conda create -n native numpy -c conda-forge will get you a osx-arm64 And then:

I reinstall some packages (e.g., scipy) pip3 install . With this protocol, I no longer have the error when I import pyrt, but another one: 1 """The :code:surface` module contains structures for creating arrays related to 2 DISORT's surface treatment. 3 """ 4 import numpy as np ----> 5 from disort import disobrdf 8 def make_empty_bemst(n_streams: int) -> np.ndarray: 9 """Make an empty bemst array. 10 11 Parameters (...) 19 20 """

ModuleNotFoundError: No module named 'disort'`

Maybe is now the same problem as the issue #14 https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkconnour%2FpyRT_DISORT%2Fissues%2F14&data=05%7C02%7Cmjwolff%40spacescience.org%7Cf77f921179444af2966f08dc3eb5ee53%7C3461589e91624c2e8e5b764489129af6%7C1%7C0%7C638454198323082737%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=E5buAJnpaLUomPf%2Fv3KCJ5zgHh8T34cZ2rrRIGPeL4U%3D&reserved=0.

(Oui je suis au LATMOS maintenant!)

— Reply to this email directly, view it on GitHub https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkconnour%2FpyRT_DISORT%2Fissues%2F2%23issuecomment-1983669204&data=05%7C02%7Cmjwolff%40spacescience.org%7Cf77f921179444af2966f08dc3eb5ee53%7C3461589e91624c2e8e5b764489129af6%7C1%7C0%7C638454198323093364%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=84C751EwJvkTFIxqqRTep%2BVhJIRei5vzl7HiHHKiVNM%3D&reserved=0, or unsubscribe https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAKXHPCLPJIRKPZKJXNOIMDYXB5DHAVCNFSM43TYU7AKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJYGM3DMOJSGA2A&data=05%7C02%7Cmjwolff%40spacescience.org%7Cf77f921179444af2966f08dc3eb5ee53%7C3461589e91624c2e8e5b764489129af6%7C1%7C0%7C638454198323101033%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=wjwQw7C1djzFSjyJyxBFF7FHP%2FGMz3nrtyqQJjCpJjw%3D&reserved=0. You are receiving this because you were mentioned.

YLeseigneur commented 6 months ago

Hi Mike,

No chance, I pay attention to activate the conda environment. Maybe it's a mismatch between conda env and native env which is not totally resolved by the procedure you referred to.

Yes, I can upgrade the OSX. I will do it during lunchtime and I will keep you in touch. (I guess I will also have to uninstall and reinstall gfortran with the adequate binary files.)

kconnour commented 2 months ago

I've separated the repositories into pyDISORT and pyRT_DISORT. Consequently, the FORTRAN compilation issue is no longer part of this repo and has seemingly been fixed in the other repo: https://github.com/kconnour/pyDISORT. If this issue persists, please raise an issue over there.