I had issues getting K40 Whisperer to work on Ubuntu and thought I would share the solution. My laser cutter isn’t here yet so I haven’t tried it with the actual laser. I had problems making it run and with it opening an SVG file.
I tried this on Ubuntu 16 and 18.
After installing and updating Ubuntu, I followed these steps:
Install Inkscape using the Ubuntu Software tool
From the command line, run this command to install the required software for K40 Whisperer:
sudo apt-get install python-pip python-tk
Make a folder named tmp in your home directory.
Download the K40 Whisperer source 0.51 from the ScorchWorks web site. Unzip it in your home directory.
Edit the requirements.txt file and change the line that says pillow to:
- Edit the file svg_reader.py. There are two lines that have tempfile.mkdtemp() in them. Change both to:
tempfile.mkdtemp(dir=os.environ[“HOME”] + “/tmp”)
- Run this command to install python libraries from inside the K40_Whisperer_0.51_src folder:
pip install -r requirements.txt
When you try to open an SVG file, it will tell you it can’t find Inkscape. Go to Settings -> General Settings. Put /snap/bin/inkscape in the Inkscape Executable box and click Close.
Go to File -> Save Settings File and save the settings to a file named k40_whisperer.txt in your home folder. This is so the settings get loaded each time you use K40 Whisperer.
Once all that is done, K40 whisperer runs and you can load an SVG file.
The change to requirements.txt is needed because K40 whisperer uses an old version of python and the newest version of pillow doesn’t support python 2 anymore.
The tmp folder change is required because Ubuntu snap software doesn’t have rights to the system tmp folder so when K40 whisperer writes files to /tmp, Inkscape doesn’t have permission to read them. This makes K40 whisperer use a tmp folder in your home folder instead.
This took me quite a while to figure out so I hope it helps others. After I use it with my laser cutter, I’ll test to make sure it works with the laser cutter and then I’ll send these changes to the author of the software (in a way that will also work with Windows).