-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Numpy import error when using conda-forge build of numpy 2.2.3 // no issue with pip #347
Comments
Thanks for the issue. Can you please provide the result of
|
sure np:
|
Can you do
and then try again? Also, please wrap outputs of logs/traces etc. in triple-backticks. I've edited your posts to this effect. |
Hello,
I get the following when I run that in terminal in my conda base when running those three lines.
```
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: no LC_RPATH load command with path: @loader_path found in: /Users/jeffreybaker/miniforge3/envs/test-env/lib/libgfortran.5.dylib (for architecture arm64), required for specified option "-delete_rpath @loader_path"
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: no LC_RPATH load command with path: @loader_path/ found in: /Users/jeffreybaker/miniforge3/envs/test-env/lib/libgfortran.5.dylib (for architecture arm64), required for specified option "-delete_rpath @loader_path/“
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Users/jeffreybaker/miniforge3/envs/test-env/lib/libgfortran.5.dylib
```
Thank you
|
This is a backtick: ` You need three of them before/after your code blocks. You can try with quoting
after ensuring that the file is writeable, e.g.
Otherwise I'm out of ideas here. |
Apologies, I mistakenly read "brackets". so I've uninstalled conda/miniforge and reinstalled and have noticed an unexpected error once I have indicated that I want to automatically initialise conda, I get the block set out below. Why is it referencing mamba and why would there be an error in a new install?
|
This is a triple backtick: If this is still unclear, I want you to click "edit" on one of your posts and see for yourself how I've modified it. Further, you should use the "Preview" button when writing (or editing) a comment to check that it is formatted correctly. I will stop responding if you cannot handle this basic bit of etiquette after 3 separate explanations.
Uninstalling conda/micromamba will not change this, though of course you should check that your installer is up to date. The error you showed is unrelated to the issue here. |
Apologies. You might have noticed that I did indeed include backticks but was unaware that it was not on a new line. My goal is to solve the problem, not offend a mod. I have created a new environment, installed the (very few packages) I need for my model and have re-ran the instructions you kindly provided. The first instruction:
returns:
and your further instructions return: Instruction 1:
Return 1:
Instruction 2:
Return 2:
Instruction 3
Return 3:
And now when I activate the test-env environment, Spyder crashes, so created a new environment with just python 3.12, ipython, numpy, but unfortunately still have the same error despite libgfortran and libgfortran.5 being installed (see below). Package List:
Error:
Thank you in advance for your help and patience. |
What's
|
I tried to reproduce, but can't. I am on Sequoia 15.3.1, and use
|
I note that miniforge version 25.1.1 is a pre-release. I wonder if that could be an issue. What happens if you roll back to miniforge version 24.11.3? |
Thanks for trying to reproduce. I re-installed miniforge yesterday night from https://conda-forge.org/download/ and have the same issue with 24.11.3 unfortunately. I literally wiped my hard drive and reinstalled Sequoia then
|
Using |
It uses whatever blas flavour you want (see #341), with the exception of the new accelerate from macOS 13.3, which is waiting for conda-forge/blas-feedstock#105 |
@bakj1979, please respond to this question
|
Hello, I have no idea what that was. I was following the lead of @h-vetinari who asked me to run that and provide the output, which was:
|
I have tried intalling numpy 2.2.1 and get a similar error. I don't understand why pip install works fine. (don't laugh) could this have anything to do with Command Line Tools? Other than conda, that is the only package I have installed myself (i.e. I wiped my hard drive, installed Sequoia and nothing else other than Command Line Tools). Thank you for trying to help me out with this.
|
Please provide the output from the otool command, but without the grep at the end. |
Sure, here you go.
|
That was for libgfortran. Can you provide |
Apologies. Here you go:
|
Hello, Just wondering if anyone had any thoughts on this issue? Thanks |
The load paths seem to be correct from otool, matching what I see on my computer. It's difficult to know where to you from here as the issue is not reproducible by others. The only remaining thing I can think of is that there's something in your environment variables that might affect loading. I am reluctant to ask what environment variables you have set in case there's something sensitive. |
I also am having the problems loading numpy and python 3.12.9 pulling packages from conda forge. |
We cannot analyse anything with such vague statements. Please provide the full stacktrace, as well as the outputs from |
Here is the stack trace after trying to import numpy in the REPL.
Output of conda info
Output of mamba list:-
|
I do not think there is anything sensitive. Here are the env variables:
Conda Info:
Conda List:
My workaround has been to install everything I need and then force reinstall numpy with pip. |
Solution to issue cannot be found in the documentation.
Issue
Problem
Started getting import error for numpy in existing environment earlier this week after conda update -all, so I wiped everything and now have a clean install of Sequoia and miniforge (where I followed instructions from README).
I have created a new conda env and installed python 3.12 and numpy using conda-forge distrib, and it gives me the same import error. When I remove numpy and reinstall with pip, I do not get any problems. It does require me to then install all apps that have dependencies on numpy (e.g. pandas or matplotlib) with pip, as it is other wise (re)installed using conda-forge as its source.
Conda was installed with standalone installer my MBP M4 Max running MacOS 15.3.
Error upon numpy import:
Installed packages
Environment info
The text was updated successfully, but these errors were encountered: