-
Notifications
You must be signed in to change notification settings - Fork 19
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
Python 3.11 so3g import not working #1038
Comments
Short answer, this isn't really an sotodlib problem... There are shared library conflicts, likely between so3g and numpy or scipy or another heavy mathematical package coming from conda. Where did you get so3g? Are you using soconda, or pip installing so3g, or building so3gf it from source? soconda is worth the investment, and the installation docs are quite good. This library issue (likely) is exactly the kind of problem it was set up to solve! The import order of dependencies is what is mattering here -- for example in the past we had a conflict where scipy and so3g would only import in one order, not the other. But when that is the case, it's a sign something is going to be weird downstream, even if the import seems to work. |
Based on the errors, it looks like this is on a laptop / workstation using commercial anaconda installed to your user account. For consideration, here are some things to try: Option 1
I just tested these commands and the import in your original post works. Option 2Use soconda to do this. Use the "binary" config so that it does not try to build any packages. Let me know if you want more details. |
This is actually on an Argonne cluster so I'm not sure about installing my own conda from scratch. The anaconda environment I'm starting with there is very empty though. I'd need to go talk to support about how to do more complicated installs. FWIW I appear to have fixed my issue by just going down to python 3.10.15
This works whether or not I install so3g first. So really just seems like current install setup isn't good enough for 3.11? |
Note that running those commands exactly as you have written will install so3g somewhere else, since the I believe your current environment probably has a mix of incompatible packages installed. If you don't want to install your own conda (you don't need root to do that), then at least do Then you could try to run the commands I previously posted using their anaconda base environment:
|
oh true, I did activate it, just forgot to copy the command here (editing comment) your conda throws errors. it's a least weird because
|
OK, my commands were tested with a conda-forge base environment (which has all those packages in the conda-forge channel). Anaconda only has a smaller set of packages in their commercial default channels. If I were you I would abandon the Anaconda that ALCF or whatever cluster has installed. Anaconda basically has no added value except some commercial support contract. They even use conda-forge infrastructure for building the packages in their commercial channels. NERSC has switched to using a conda-forge base environment. You can just install miniforge to someplace in your home directory. |
Ok, can confirm that Ted's instructions above did work when I actually went and did them :-D |
(Edit because I realize the first version wasn't the actual error).
Trying to get sotodlib built with python 3.11. (Already gave up on 3.12). Running
import so3g
import the first time fails with the error below. But is works if you just run it againso putting this at the top of scripts is now my fix
The text was updated successfully, but these errors were encountered: