@achrn said in pip won't install dsf-python-3.5.1rc1:
@Falcounet I'm entirely happy to have dsf-python system-wide, but I think pip is saying it won't install dsf-python and saying I should use apt, but I don't think there's an apt package for dsf-python - apt-cache search dsf-python
doesn't find any likely contenders.
Yes because we don't maintain a deb package for dsf-python to be installed with APT. pip does it just fine.
You are right about pip refusing to installing it system-wide though, it needs an override to work.
But as said earlier, you can still install it using pip for any user (so without sudo) or in a virtual environnement.
If I put dsf-python into a virtual environment I don't think that the DSF running on the system will find it or use it - it's not in that virtual environment. Will the DSF plugins system find and use a dsf-python in a virtual environment?
Yes it will work. The virtual environnement is for python only. It will still connect to DSF using the IPC API.
For dsf plugins to work, you need to have dsf-python installed for dsf user.
Having done some digging, it seems pip has been deliberately disabled:
https://www.raspberrypi.com/documentation/computers/os.html#about-python-virtual-environments says "In previous versions of the operating system, it was possible to install libraries directly, system-wide, using the package installer for Python, commonly known as pip. ... In newer versions of Raspberry Pi OS, and other operating systems, this is disallowed. ... from Bookworm onwards, packages installed via pip must be installed into a Python virtual environment using venv. A virtual environment is a container where you can safely install third-party modules so they won’t interfere with, or break, your system Python." which suggests that install instructions using pip aren't going to work on newest DuetPi (which is Bookworm) or any future version.
So having been through a time where setup.py was deprecated and pip was advocated, pip is apparently now not usable, forcing users back to setup.py (unless you're happy to have your python running only is an isolated sandbox). I think. (I despised python even before this...) That or dsf-python is going to need an apt package in the Duet3D repository.
pip is disabled to install system-wide packages. I don't think it is disabled for a normal user.