-
Notifications
You must be signed in to change notification settings - Fork 137
Description
Issue Description:
The current installation instructions for macOS (using install_osx.py) fail on newer versions like macOS 14.7 due to PEP 668, which marks Homebrew Python as "externally managed" and blocks pip installations without a virtual environment. This results in errors like:
error: externally-managed-environment
...
To fix this, I recommend updating the README with a virtual environment (venv) approach for the Python package installations. Here's a complete, working set of steps for Apple Silicon (M1/M2/M3) Macs:
Prerequisites:
-
Install Homebrew (if not already):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Restart Terminal or run:eval "$(/opt/homebrew/bin/brew shellenv)". -
Install dependencies:
brew install libusb python3 git # (git if not installed) -
Clone the repository:
cd ~/Desktop # or desired folder
git clone https://github.com/fablabnbg/inkscape-silhouette.git
cd inkscape-silhouette
Install Python Packages Using venv (to Bypass PEP 668):
-
Create a virtual environment:
/opt/homebrew/bin/python3 -m venv ~/inkscape-venv -
Activate it:
source ~/inkscape-venv/bin/activate -
Install required packages:
pip install cssselect lxml tinycss2 matplotlib pyusb wxpython
(Note:wxpythonmay take time to compile; if it fails, runbrew install wxwidgetsfirst.) -
Run the installation script (while venv is active):
chmod +x install_osx.py # if needed
./install_osx.py -
Deactivate venv:
deactivate
Configure Inkscape:
-
Edit
~/Library/Application Support/org.inkscape.Inkscape/config/inkscape/preferences.xml(use TextEdit or similar).
Find<group id="extensions" ... />and set:
python-interpreter="/Users/<your-username>/inkscape-venv/bin/python3"
(Replace<your-username>with your actual username.) -
Restart Inkscape. The extension should appear under Extensions > Export > Send to Silhouette.
This approach isolates dependencies and avoids system risks. Tested on macOS 14.7.1 (M1). Would be great to incorporate into the README!