another issue with rip is that when closing the window, I have to call
With a RIP build, you must source the rip-environment
script in *every* shell attempting to run LinuxCNC, or
halrun, or any other LinuxCNC-specific scripts or
executables. The script is also needed to set
environmental variables for locating scripting language
modules/libraries.
The script establishes the correct environmental
variables for:
1) PATH (used for locating executables)
2) PYTHONPATH (for locating python modules)
3) TCLLIBPATH (for locating tcl libraries)
4) etc.
Example session (on buster testing dgarr/py3):
Code:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
$ which python
/usr/bin/python
$ python --version
Python 3.7.3
$ python
Python 3.7.3 (default, Apr 3 2019, 05:39:12)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import hal
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'hal'
>>>
$
$ # fix by sourcing rip-environment in your linuxcnc-dev directory:
$
$ source /home/git/linuxcnc-dev/scripts/rip-environment
$ python
Python 3.7.3 (default, Apr 3 2019, 05:39:12)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import hal
>>> dir(hal)
['HAL_BIT', 'HAL_FLOAT', 'HAL_IN', 'HAL_IO', 'HAL_OUT', 'HAL_RO', 'HAL_RW', 'HAL_S32', 'HAL_U32', 'MSG_ALL', 'MSG_DBG', 'MSG_ERR', 'MSG_INFO', 'MSG_NONE', 'MSG_WARN', 'Param', 'Pin', '_ItemWrap', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', '_hal', 'component', 'component_exists', 'component_is_ready', 'connect', 'error', 'get_msg_level', 'get_value', 'is_kernelspace', 'is_rt', 'is_sim', 'is_userspace', 'item', 'new_sig', 'pin_has_writer', 'sampler_base', 'set_msg_level', 'set_p', 'stream', 'streamer_base']
>>>
NOTE: If a system has both RIP build and a deb install, things can
get *very* confusing if you are not careful. I usually uninstall
LinuxCNC debs when testing RIP builds.