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
(pyros-ros) alexv@AlexV-Linux:~/Projects/ros_pyros_ws/src/pyros_rosinterface$ python
Python 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import rospy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named rospy
>>> import pyros_setup
>>> pyros_setup.configurable_import().configure().activate()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/pyros_setup/__init__.py", line 92, in configure
""")
File "/usr/local/lib/python2.7/dist-packages/pyros_config/confighandler.py", line 74, in configure_file
os.makedirs(os.path.dirname(cfg_filename))
File "/home/alexv/.virtualenvs/pyros-ros/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/instance'
In that case :
we run from a virtualenv
we use pyros from an installed location
BUT the config file is attempted to be created along the package, instead of going to /usr/var.
The text was updated successfully, but these errors were encountered:
alexv@AlexV-Linux:~/Projects/ros_pyros_ws/src/pyros_rosinterface$ python
Python 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyros_setup
>>> p = pyros_setup.configurable_import().configure().activate()
Re-adding /opt/ros/indigo/lib/python2.7/dist-packages in front of sys.path
Re-adding /home/alexv/Projects/ros_pyros_ws/devel/lib/python2.7/dist-packages in front of sys.path
Re-adding /home/alexv/Projects/ros_pyros_ws/devel/lib/python2.7/site-packages in front of sys.path
Re-adding /home/alexv/Projects/ros_pyros_ws/src/pyros_schemas in front of sys.path
Re-adding /home/alexv/Projects/ros_pyros_ws/src/pyros_rosinterface in front of sys.path
Re-adding /home/alexv/Projects/ros_pyros_ws/src/pyros in front of sys.path
Re-adding /home/alexv/Projects/ros_pyros_ws/src/pyros_schemas_examples/pyros_httpbin in front of sys.path
Re-adding /home/alexv/Projects/ros_pyros_ws/src/pyros_utils in front of sys.path
>>> vars(p.config_handler)
{'name': 'pyros_setup', 'import_name': 'pyros_setup', 'root_path': '/usr/local/lib/python2.7/dist-packages/pyros_setup', 'instance_path': '/home/alexv/Projects/ros_pyros_ws/devel/var/pyros_setup-instance', 'config': <Config {'WORKSPACES': [], 'DISTRO': 'jade'}>, 'default_config': {'WORKSPACES': [], 'DISTRO': 'jade'}}
>>>
So in that case the instance path was setup in the appropriate place (not along the installed package)...
This seems to be a bug in the current release of pyros-config. It is not taking 'dist-packages' as an installed location when coming from a virtualenv (only site-packages is recognized).
After changing, pyros-setup attempts to create into /usr/local/var which I think is the expected behavior.
Anyway, pyros-setup is supposed to be installed in the python environment. so when using from venv, it should be found in venv, and not on system. However creating a venv that uses system packages will find already installed system wide package, and will not reinstall pyros-setup in venv...
an improvement would be to force the install of pyros_setup there...
Failing Example :
In that case :
The text was updated successfully, but these errors were encountered: