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

Installation instruction does not work on Ubuntu 23.10 #82

Open
lasseo opened this issue Nov 15, 2023 · 7 comments
Open

Installation instruction does not work on Ubuntu 23.10 #82

lasseo opened this issue Nov 15, 2023 · 7 comments

Comments

@lasseo
Copy link

lasseo commented Nov 15, 2023

Installing basic requirements via requirements.sh does not work on Ubuntu 23.10.
Installation of python dependencies/libraries no longer accepted via pip/pip3.

@jpattWPC
Copy link
Collaborator

jpattWPC commented Nov 15, 2023 via email

@lasseo
Copy link
Author

lasseo commented Nov 16, 2023

user@ubuntu-desktop:~/source-code/PVE-VDIClient$ ./requirements.sh
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.

This documents describes workarounds, but I have no success yet.
https://www.omgubuntu.co.uk/2023/04/pip-install-error-externally-managed-environment-fix

@joshpatten
Copy link
Owner

OK, if you try to run the VDI client, what imports does it claim are missing?

@lasseo
Copy link
Author

lasseo commented Nov 25, 2023

The problem is that Ubuntu no longer allow Python modules to be installed via PIP.
https://www.omgubuntu.co.uk/2023/04/pip-install-error-externally-managed-environment-fix
So, the requirements script will completely fail, and hence it will be missing all these dependencies.

@jpattWPC
Copy link
Collaborator

jpattWPC commented Nov 26, 2023 via email

@lasseo
Copy link
Author

lasseo commented Nov 27, 2023

#1) Reguirements script fails

lars@lars-pc-i440fx-8-1:~/PVE-VDIClient$ ./requirements.sh
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.
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.
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.

2# Testing to start without dependencies.

lars@lars-pc-i440fx-8-1:~/PVE-VDIClient$ ./vdiclient.py
Traceback (most recent call last):
File "/home/lars/PVE-VDIClient/./vdiclient.py", line 2, in
import proxmoxer # pip install proxmoxer

3# resolve the proxmoxer dependency error through installing correct deb package
sudo apt-get install python3-proxmoxer

4# the dependency to python3-requests is already installed.

5# Another try to start vdiclient
Traceback (most recent call last):
File "/home/lars/PVE-VDIClient/./vdiclient.py", line 3, in
import PySimpleGUI as sg # pip install PySimpleGUI
^^^^^^^^^^^^^^^^^^^^^^^^PySimpleGUI
ModuleNotFoundError: No module named 'PySimpleGUI'

No DEB package available to install PySimpleGUI

@joshpatten
Copy link
Owner

joshpatten commented Nov 27, 2023

I don't think there's a .deb package for PySimpleGUI, but you can install it this way if you're willing to accept the risk of a potential package break in the future:

First, ensure tkinter is installed:

apt install python3-tk

Then force override the installation of pysimplegui:

pip install --break-system-packages PySimpleGUI

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

3 participants