You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i just try to use urx to control ur real robor, but when i import, "no mudule urx"problem happened.and even when i add "export PYTHONPATH=$PYTHONPATH:/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/" to point the package road, it tells me below. my code:
#! /home/zp/anaconda3/envs/yiye/bin/python
import urx
import logging
if name == "main":
try:
logging.basicConfig(level=logging.INFO)
robot = urx.Robot("192.168.0.10")
end_effector_pose = robot.getl()
print("末端位姿:", end_effector_pose)
finally:
robot.close() error_message:
Traceback (most recent call last):
File "/home/zp/catkin_ws/devel/lib/motion_planing/test.py", line 15, in
exec(compile(fh.read(), python_script, 'exec'), context)
File "/home/zp/catkin_ws/src/motion_planing/scripts/test.py", line 2, in
import urx
ModuleNotFoundError: No module named 'urx'
(yiye) zp@zp-ros:/catkin_ws$ export PYTHONPATH=$PYTHONPATH:/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/
(yiye) zp@zp-ros:/catkin_ws$ rosrun motion_planing test.py
Traceback (most recent call last):
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/numpy/core/init.py", line 24, in
from . import multiarray
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/numpy/core/multiarray.py", line 10, in
from . import overrides
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/numpy/core/overrides.py", line 8, in
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/numpy/init.py", line 130, in
from numpy.config import show as show_config
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/numpy/config.py", line 4, in
from numpy.core._multiarray_umath import (
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/numpy/core/init.py", line 50, 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:
The Python version is: Python3.8 from "/usr/bin/python3"
The NumPy version is: "1.26.4"
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 "/home/zp/catkin_ws/devel/lib/motion_planing/test.py", line 15, in
exec(compile(fh.read(), python_script, 'exec'), context)
File "/home/zp/catkin_ws/src/motion_planing/scripts/test.py", line 2, in
import urx
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/urx/init.py", line 4, in
from urx.urrobot import RobotException, URRobot # noqa
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/urx/urrobot.py", line 9, in
from urx import urrtmon
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/urx/urrtmon.py", line 14, in
import numpy as np
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/numpy/init.py", line 135, 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.
The text was updated successfully, but these errors were encountered:
i just try to use urx to control ur real robor, but when i import, "no mudule urx"problem happened.and even when i add "export PYTHONPATH=$PYTHONPATH:/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/" to point the package road, it tells me below.
my code:
#! /home/zp/anaconda3/envs/yiye/bin/python
import urx
import logging
if name == "main":
try:
logging.basicConfig(level=logging.INFO)
robot = urx.Robot("192.168.0.10")
end_effector_pose = robot.getl()
print("末端位姿:", end_effector_pose)
finally:
robot.close()
error_message:
Traceback (most recent call last):
File "/home/zp/catkin_ws/devel/lib/motion_planing/test.py", line 15, in
exec(compile(fh.read(), python_script, 'exec'), context)
File "/home/zp/catkin_ws/src/motion_planing/scripts/test.py", line 2, in
import urx
ModuleNotFoundError: No module named 'urx'
(yiye) zp@zp-ros:
/catkin_ws$ export PYTHONPATH=$PYTHONPATH:/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages//catkin_ws$ rosrun motion_planing test.py(yiye) zp@zp-ros:
Traceback (most recent call last):
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/numpy/core/init.py", line 24, in
from . import multiarray
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/numpy/core/multiarray.py", line 10, in
from . import overrides
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/numpy/core/overrides.py", line 8, in
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/numpy/init.py", line 130, in
from numpy.config import show as show_config
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/numpy/config.py", line 4, in
from numpy.core._multiarray_umath import (
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/numpy/core/init.py", line 50, 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 "/home/zp/catkin_ws/devel/lib/motion_planing/test.py", line 15, in
exec(compile(fh.read(), python_script, 'exec'), context)
File "/home/zp/catkin_ws/src/motion_planing/scripts/test.py", line 2, in
import urx
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/urx/init.py", line 4, in
from urx.urrobot import RobotException, URRobot # noqa
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/urx/urrobot.py", line 9, in
from urx import urrtmon
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/urx/urrtmon.py", line 14, in
import numpy as np
File "/home/zp/anaconda3/envs/yiye/lib/python3.9/site-packages/numpy/init.py", line 135, 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.
The text was updated successfully, but these errors were encountered: