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

error : externally-managed-environment #82

Open
Oceanique opened this issue Feb 7, 2024 · 10 comments
Open

error : externally-managed-environment #82

Oceanique opened this issue Feb 7, 2024 · 10 comments

Comments

@Oceanique
Copy link

Hello,

I succesfully, in 2022, set up a Raspberry Pi HQ camera with a RPi 4B, it was working beautifully (I was planning to use it for astronomy).

After two years without connecting it to my PC which I changed the OS from Ubuntu to Linux Mint, the camera wasn't detected with lsusb.

I suspected the OS to be the problem so I switched back to the latest Ubuntu, but still nothing. So I formatted the SD card from the RPi4B, installed the last "lite 64 bits" release and I have this message showing up :

**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 pythton3 -m venv path/to/venv.
Then use path/to/new/bin/python and path/to/new/bin/pip. Make
sure you have python3-full installed.

For more information visit http://rptl.io/venv

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.**

What should I do ? Thanks.

@starbasessd
Copy link

As far as RPiOS, you may need to go back to Buster or Bullseye, as Bullseye and Bookworm have major changes over Buster and camera software and Python. It is well documented on the RPi Foundation forums. I believe a lot of the changes went upstream to Debian and over to all the other Debian based OSs...

@Oceanique
Copy link
Author

Thank you, I'm really a newbie in RPi world, I will do that thanks ! I'll get this post updated :)

@Oceanique
Copy link
Author

Hm just to be clear, you meant going back to Buster on my main computer or to Buster on the RPi ? Thank you

@starbasessd
Copy link

Buster on the Pi.

@Oceanique
Copy link
Author

Thank you, I was on Deepl to clarify the "as far as RPiOS", my English isn't very good ^^.

@Oceanique
Copy link
Author

Hello again, it was hard to make Buster work on a RPi 4B because it couldn't boot : the problem was fixed by replacing the start4.elf and fixup4.dat files by the most recent ones.

Still, after following the instructions on the project main page, I got this error :

Could not find a version that satisfies the requirement ansible-core~=2.16.0 (from ansible) (from versions: 0.0.1a1, 2.11.0b1, 2.11.0b2, 2.11.0b3, 2.11.0b4, 2.11.0rc1, 2.11.0rc2, 2.11.0, 2.11.1rc1, 2.11.1, 2.11.2rc1, 2.11.2, 2.11.3rc1, 2.11.3, 2.11.4rc1, 2.11.4, 2.11.5rc1, 2.11.5, 2.11.6rc1, 2.11.6, 2.11.7rc1, 2.11.7, 2.11.8rc1, 2.11.8, 2.11.9rc1, 2.11.9, 2.11.10rc1, 2.11.10, 2.11.11rc1, 2.11.11, 2.11.12rc1, 2.11.12)
No matching distribution found for ansible-core~=2.16.0 (from ansible)

@Oceanique
Copy link
Author

Oceanique commented Feb 8, 2024

With Bullseye, there's no error showing up (only telling me "permission denied" when entering the last command "ansible-playbook main.yml", I use sudo and it works fine.).

But on Ubuntu Ubuntu 22.04.3 LTS, with dmesg -w command, it returns this :

[50888.674864] usb 2-2: new high-speed USB device number 22 using xhci_hcd
[50893.814931] usb 2-2: device descriptor read/64, error -110
[50909.430943] usb 2-2: device descriptor read/64, error -110
[50909.539097] usb usb2-port2: attempt power cycle
[50909.954846] usb 2-2: new high-speed USB device number 23 using xhci_hcd
[50915.190979] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
[50920.566886] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
[50920.774827] usb 2-2: device not accepting address 23, error -62
[50920.902906] usb 2-2: new high-speed USB device number 24 using xhci_hcd
[50925.942993] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
[50931.318976] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
[50931.526927] usb 2-2: device not accepting address 24, error -62
[50931.527049] usb usb2-port2: unable to enumerate USB device

And it's not detected with lsusb...

I'm going to install Ubuntu 20.04.6 LTS on my main computer to see how it goes, I'll get you updated.

@starbasessd
Copy link

Did you try different USB ports, or a self-powered USB hub? Do you have other USB devices plugged in?

@Oceanique
Copy link
Author

Oceanique commented Feb 8, 2024

Did you try different USB ports, or a self-powered USB hub? Do you have other USB devices plugged in?

Yes I tried the three of them and there's no other USB devices plugged in, I still get the same errors with dmesg -w with Ubuntu 20.04.6 LTS

I've installed v4l-utils and ffmpeg, still nothing? I also get the following :
[ 1397.083469] usb 2-1: new high-speed USB device number 10 using xhci_hcd
[ 1402.283512] usb 2-1: device descriptor read/64, error -110

as in this open issue : #72 and the last reply recommend this project which is more recent : https://github.com/showmewebcam/showmewebcam

I'm going to try it on a "pure" Debian Buster or Bullseye on my main computer, maybe Ubuntu is causing issues, but before I'm going to try the other Github project

@Oceanique
Copy link
Author

Oceanique commented Feb 9, 2024

Wait a minute... Is it normal to see the desktop or the RPiOS lite waiting for me to log in on my monitor when I restart it ? It's like it's doing nothing, there's no script running, the "pi-webcam" line is showing up though. I kinda remember it wasn't the case two years ago...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants