Hello Mactalla,
you got me…
Indeed, I seem to have downloaded a webpage. Thought, the script itself was linked there so right clicked and downloaded.
Have now the *.py script laying in place.
Ran it and received this:
markus@MacBook-Pro-Markus PythonScript % python3 matter-binding.py --from 35 --to 34
Traceback (most recent call last):
File “/Users/markus/PythonScript/matter-binding.py”, line 5, in
import websocket
ModuleNotFoundError: No module named ‘websocket’
markus@MacBook-Pro-Markus PythonScript % pip3 install websocket-client
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
xyz, where xyz is the package you are trying to
install.
If you wish to install a Python library that isn't in Homebrew,
use a virtual environment:
python3 -m venv path/to/venv
source path/to/venv/bin/activate
python3 -m pip install xyz
If you wish to install a Python application that isn't in Homebrew,
it may be easiest to use 'pipx install xyz', which will manage a
virtual environment for you. You can install pipx with
brew install pipx
You may restore the old behavior of pip by passing
the '--break-system-packages' flag to pip, or by adding
'break-system-packages = true' to your pip.conf file. The latter
will permanently disable this error.
If you disable this error, we STRONGLY recommend that you additionally
pass the '--user' flag to pip, or set 'user = true' in your pip.conf
file. Failure to do this can result in a broken Homebrew installation.
Read more about this behavior here: <https://peps.python.org/pep-0668/>
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
markus@MacBook-Pro-Markus PythonScript % brew install pipx
==> Auto-updating Homebrew…
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew
).
==> Homebrew collects anonymous analytics.
Read the analytics documentation (and how to opt-out) here:
Link to …docs.brew.sh/Analytics
No analytics have been recorded yet (nor will be during this brew
run).
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
Link to …github.com/Homebrew/brew#donations
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Casks
mihomo-party
==> Downloading Link to …ghcr.io/v2/homebrew/core/pipx/manifests/1.7.1_1
##################################################################################################################### 100.0%
==> Fetching pipx
==> Downloading
Link to …ghcr.io/v2/homebrew/core/pipx/blobs/sha256:ca676ccaaf770e835c5a9ae2d3a648ef4539893c02aa8a70875bfd3e3
##################################################################################################################### 100.0%
==> Pouring pipx–1.7.1_1.arm64_sequoia.bottle.tar.gz
==> Caveats
zsh completions have been installed to:
/opt/homebrew/share/zsh/site-functions
==> Summary
/opt/homebrew/Cellar/pipx/1.7.1_1: 155 files, 1019.1KB
==> Running brew cleanup pipx
…
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew
).
markus@MacBook-Pro-Markus PythonScript % pip3 install websocket-client
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
xyz, where xyz is the package you are trying to
install.
If you wish to install a Python library that isn't in Homebrew,
use a virtual environment:
python3 -m venv path/to/venv
source path/to/venv/bin/activate
python3 -m pip install xyz
If you wish to install a Python application that isn't in Homebrew,
it may be easiest to use 'pipx install xyz', which will manage a
virtual environment for you. You can install pipx with
brew install pipx
You may restore the old behavior of pip by passing
the '--break-system-packages' flag to pip, or by adding
'break-system-packages = true' to your pip.conf file. The latter
will permanently disable this error.
If you disable this error, we STRONGLY recommend that you additionally
pass the '--user' flag to pip, or set 'user = true' in your pip.conf
file. Failure to do this can result in a broken Homebrew installation.
Read more about this behavior here: https://peps.python.org/pep-0668/
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
As you can see, I tried to install the web socket-client and as it looked to me that I needed pipe, I tried to install this via Homebrew as well, but no success.
I had to cut https:// in front of some of the links as I am restricted as new forums user.
Again, thanks for helping out!
Session