Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] error: externally-managed-environment #1312

Closed
Deekee62 opened this issue Jul 19, 2023 · 8 comments
Closed

[BUG] error: externally-managed-environment #1312

Deekee62 opened this issue Jul 19, 2023 · 8 comments
Labels
bug Something isn't working stale

Comments

@Deekee62
Copy link

Describe the bug

Since then I've upgraded to Debian Bookworm and when trying to use the OpenTimestamps client I get the following error:

ots --version
Traceback (most recent call last):
  File "/usr/local/bin/ots", line 5, in <module>
    from otsclient.ots import main
ModuleNotFoundError: No module named 'otsclient'

Location in guide

[https://raspibolt.org/guide/bitcoin/bitcoin-client.html#opentimestamps-client]

Expected behavior

I installed the open opentimestamps-client on Debain BullsEye some months ago using:

$ sudo apt-get install python3 python3-dev python3-pip python3-setuptools python3-wheel

and

$ sudo pip3 install opentimestamps-client

I also checked the OpenTimestamps client version to check that it is properly installed

$ ots --version
v0.7.1

An everything seemed to work fine and I used it many times to verify more timestamps, when installing additional programs (e.g. LND) and when updating existing programs to a newer version.

Environment

  • Hardware platform: Apple Macmini6,2
  • Operating system: Debian 12
  • Version: No LSB modules are available. Debian GNU/Linux 12 (bookworm)

Additional context

Add any other context about the problem here.

@Deekee62 Deekee62 added the bug Something isn't working label Jul 19, 2023
@keyser-soeze
Copy link

#1305 (comment)

@Deekee62
Copy link
Author

Are you sure --break-system-packages as mentioned in #1305 is the correct way do do it, as pip may break Python modules that part of the Debian system depends on.

I think it's recommend to install it with pipx (in the "pipx" Debian
package). as pipx will set up an environment isolated from other applications and
system Python modules, and install the application and its dependencies into
that.

@keyser-soeze
Copy link

keyser-soeze commented Jul 21, 2023

i've done this way. it has been working without issues. it's your decision to try it.

since you've upgraded from bullseyeto bookwormthe hard way (there isn't a official raspberry pi os yet), I don't think you feel uncomfortable breaking things ;)

@Deekee62
Copy link
Author

Deekee62 commented Jul 24, 2023

It seems there is an open request to package it officially in Debian, but there hasn't been any progress in a few years: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921251

@Deekee62
Copy link
Author

The Debian provided python3 interpreter packages (python3.11 and pypy3) are now marked as being externally-managed, following PEP-668. The version of python3-pip provided in Debian follows this, and will refuse to manually install packages on Debian's python interpreters, unless the --break-system-packages option is specified.

@Deekee62
Copy link
Author

Deekee62 commented Jul 24, 2023

Finally I did a reinstall using:

$ sudo apt-get install python3 python3-dev python3-pip python3-setuptools python3-wheel

and then

$ sudo pip3 install opentimestamps-client --break-system-packages.

At the end of the installation I got the following warning:

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

But nevertheless OpenTimestamps client reported that it's properly installed again.

$ ots --version v0.7.1


It seems to work fine and no problems so far.

@github-actions
Copy link

This issue is marked as stale because there was no activity for 60 days. If the issue stays inactive, it will be closed in a week.

@github-actions github-actions bot added the stale label Sep 22, 2023
@github-actions
Copy link

This issue has been closed due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants