sigmf / sigmf-python

Easily interact with Signal Metadata Format (SigMF) recordings.
https://sigmf.org
GNU Lesser General Public License v3.0
42 stars 16 forks source link

Problems installing v1.2.0 #52

Closed srs4511351 closed 6 months ago

srs4511351 commented 6 months ago

The prescribed method on installing sigmf-python is with pip.

pip installation is ess3ectially blocked on Debian Bookworm.

With v1.1.5, I used sudo python3 setup.py install but setup.py in not in the v1.2.0 release.

Is there another way to install sigmf-python? My distro does not have a sigmf-python package.

I did install it like this:

git checkout v1.1.5
sudo python3 setup.py install

However, I got the message: SetuptoolsDeprecationWarning: setup.py install is deprecated.

----Steve

Teque5 commented 6 months ago

Using setuptools to install was never recommended, but I understand if you can't use pip.

Note it's generally bad practice to do a sudo install and folks usually use a user directory.

Modern alternatives to pip are conda and poetry. Before pip there was something called easy_install, but I'm not sure if that works anymore. I suspect you can avoid all this and install pip yourself as a user install running the get-pip.py script found here.

The move away from setuptools started with PEP518 in 2016 and we'll only be supporting pyproject now.

srs4511351 commented 6 months ago

pip is installed, but Debian insists that we do not use it. They say that pip in not a good idea when I try to install with pip. As of now, I do not see a good solution. The recommended solution is to install a package, but there isn't one. Is there an ARM64 .deb package available somewhere? Virtual environments would involve overhead...

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.11/README.venv for more information.

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.

I installed it with pipx as suggests in the error message, but I can't get rid of version 1.1.5. setup.py does not have an uninstall. python still loads version 1.1.5

----Steve

gmabey commented 6 months ago

I had been using the Ruby gem FPM to create a .eb package but that stopped working a couple of months ago. You can see the issue I created at the FPM GitHub page.

On Mon, Feb 26, 2024 at 11:58 AM srs4511351 @.***> wrote:

pip is installed, but Debian insists that we do not use it. They say that pip in not a good idea when I try to install with pip. As of now, I do not see a good solution. The recommended solution is to install a package, but there isn't one. Is there an ARM64 .deb package available somewhere? Virtual environments would involve overhead...

error: externally-managed-environment

× This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.

If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

See /usr/share/doc/python3.11/README.venv for more information.

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.

I installed it with pipx as suggests in the error message, but I can't get rid of version 1.1.5. setup.py does not have an uninstall. python still loads version 1.1.5

----Steve

— Reply to this email directly, view it on GitHub https://github.com/sigmf/sigmf-python/issues/52#issuecomment-1964870393, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVTOUAFWOZKYLZIU7IUZETYVTLOPAVCNFSM6AAAAABDZRAK3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRUHA3TAMZZGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Teque5 commented 6 months ago

I installed it with pipx as suggests in the error message, but I can't get rid of version 1.1.5. setup.py does not have an uninstall. python still loads version 1.1.5.

You can manually install/uninstall by modifying the files inside your site-packages/ or dist-packages/ folder. For user installs this is in .local/lib/<python_version>/ and for sudo installs in ubuntu is in /usr/local/lib/<python_version/. Unsure about other distributions.

srs4511351 commented 6 months ago

The version 1.1.5 installation was gone after a reboot. (I forced pip to uninstall it although it was installed with setup,py)

pipx installs in a virtual environment. In python, import sigmf does not find sigmf in the default environment. Virtual environments are a problem. They are difficult to use and the virtual environment would make all other modules unavailable.

I am using sigmf for an installed python program, so I won't modify that script. So far, there is no good way to install and use sigmf on Debian Bookworm lacking a apt or .deb package.