Closed cemoke closed 1 month ago
Are you sure that is the mamba activate
that adds homebrew's site-packages to your PYTHONPATH
? Can you report the ouput of the env
command before and after the activation (make sure that you remove any confidential env variables such as token or secres).
You are right. After more investigation, I realized the problem was not related to the robostack environment but to my setup. So, I am closing the issue.
Solution to issue cannot be found in the documentation.
Issue
I get the following error when I try to import numpy in mamba ros_env using ros-humble
Python 3.11.8 | packaged by conda-forge | (main, Feb 16 2024, 20:49:36) [Clang 16.0.6 ] on darwin Type "help", "copyright", "credits" or "license" for more information.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/homebrew/lib/python3.12/site-packages/numpy/init.py", line 114, in
from numpy.config import show as show_config
File "/opt/homebrew/lib/python3.12/site-packages/numpy/config.py", line 4, in
from numpy._core._multiarray_umath import (
File "/opt/homebrew/lib/python3.12/site-packages/numpy/_core/init.py", line 49, in
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed.
We have compiled some common reasons and troubleshooting tips at:
Please note and check the following:
and make sure that they are the versions you expect. Please carefully study the documentation linked above for further help.
Original error was: No module named 'numpy._core._multiarray_umath'
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "", line 1, in
File "/opt/homebrew/lib/python3.12/site-packages/numpy/init.py", line 119, in
raise ImportError(msg) from e
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.
for some reason, when I use mamba to activate ros_env, it adds homebrew's python to my PYTHONPATH, and then different versions of numpy result in this issue. Can you please help me to resolve the issue?
Installed packages
Environment info