[ERROR] [SofaPython3::SceneLoader] ModuleNotFoundError: No module named 'numpy' #98
-
Hello All, I have downloaded the binaries of version 21.06 and was looking into the tutorials of Soft Robots and I'm getting this error when I'm trying to run any of the python scripts. I can't use the latest binary version cause for my distribution i'm getting the gcc errors when i'm running ./runSofa therefore i want to stick to version 21.06 for now. I already have numpy installed on my system, what do i need to do? I'm new to both Sofa and configuring python libraries on linux. I have added the path to STLIB through the plugin manager and also have edited the plugin_list.conf file to include these |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi, Do you have different versions of python installed on your machine? For STLIB, one possible fix is to add manually the paths to stlib3 and splib3 to the PYTHONPATH. On Linux, personally, I've added this to my
Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have installed the binaries of v21.06 available here
<https://project.inria.fr/softrobot/install-get-started-2/download/> for
linux. I am using python 3.7.12 and have added the plugins SoftRobots,
STLIB and SofaPython3 to the plugin manager.
Now that I'm trying to run the tutorial that comes with the binary, namely
tutorials/FirstSteps/myproject/mystep4.py I'm getting an error
[ERROR] [SofaPython3::SceneLoader] ModuleNotFoundError: No module named
'stlib'
I have already added
export PYTHONPATH="${PYTHONPATH}:/PATH_TO/STLIB/python3/src/stlib3"
export PYTHONPATH="${PYTHONPATH}:/PATH_TO/STLIB/python3/src/splib3"
to my ~/.bashrc, where I'm assuming /PATH_TO/ means the path on my
computer to the plugins folder.
Please help me out, I have been trying to resolve this issue for a
while now and haven't even been able to run the SoftRobots tutorial.
…On Tue, Feb 1, 2022 at 10:41 AM EulalieCoevoet ***@***.***> wrote:
[This email originated from outside of OSU. Use caution with links and
attachments.]
Hi,
Do you have different versions of python installed on your machine?
If yes, is it possible that you've installed numpy for another version of
python than the one used by SOFA binaires?
For STLIB, one possible fix is to add manually the paths to stlib3 and
splib3 to the PYTHONPATH.
There are different ways
<https://bic-berkeley.github.io/psych-214-fall-2016/using_pythonpath.html>
to do that.
On Linux, personally, I've added this to my ~/.bashrc file to set it
permanently:
export PYTHONPATH="${PYTHONPATH}:/PATH_TO/STLIB/python3/src/stlib3"
export PYTHONPATH="${PYTHONPATH}:/PATH_TO/STLIB/python3/src/splib3"
Hope this helps.
—
Reply to this email directly, view it on GitHub
<#98 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXFENLRIMTUVRTTA46P4T63UZASL3ANCNFSM5MZXTG7Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi,
Thanks for the response. I noticed that too.
…On Tue, 22 Feb 2022, 7:13 am EulalieCoevoet, ***@***.***> wrote:
[This email originated from outside of OSU. Use caution with links and
attachments.]
Hi,
For the moment we want to maintain the examples for both python2 and
python3 users. So if you're using the SofaPython3 plugin, you should only
run the examples/tutorials under repositories named sofapython3. I'll try
to improve the documentation about that.
For instance:
plugins/SoftRobots/docs/tutorials/FirstSteps/details/sofapython3/
I didn't notice this file tutorials/FirstSteps/myproject/mystep4.py, I
thought they were all empty. I will add a corresponding file for python3
users.
In general, if you see an import of stilb and splib, or reference to
createObject/createChild in the file, it means that the scene is intended
for python2 users. You can also have a look at this doc SofaPython2 to
SofaPython3
<https://sofapython3.readthedocs.io/en/latest/menu/SofaPlugin.html#for-sofapython2-users>
.
Eulalie
—
Reply to this email directly, view it on GitHub
<#98 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXFENLQG7DIBVEEH4K7HIUDU4ORZBANCNFSM5MZXTG7Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Hi,
Do you have different versions of python installed on your machine?
If yes, is it possible that you've installed numpy for another version of python than the one used by SOFA binaires?
For STLIB, one possible fix is to add manually the paths to stlib3 and splib3 to the PYTHONPATH.
There are different ways to do that.
On Linux, personally, I've added this to my
~/.bashrc
file to set it permanently:Hope this helps.