ankraft / ACME-oneM2M-CSE

An open source CSE Middleware for Education.
https://acmecse.net/
BSD 3-Clause "New" or "Revised" License
23 stars 16 forks source link

Being prompted to install missing packages when they are already installed on Python 3.12.1 #136

Closed sherzod-sync closed 3 months ago

sherzod-sync commented 9 months ago

I am trying to install and start ACME.

OS: Windows 11 Python version: 3.12.1

When starting ACME with python -m acme it is asking to install missing packages, however it seems that all required packages are already installed.

The log:

One or more required packages or modules (distutils) could not be found.
Please install the missing packages, e.g. by running the following command:

        C:\Users\synctechno\AppData\Local\Programs\Python\Python312\python.exe -m pip install -r requirements.txt

Do you want to install the missing packages now? [y/N] y
Requirement already satisfied: blinker==1.6.3 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 7)) (1.6.3)
Requirement already satisfied: cbor2==5.5.0 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 9)) (5.5.0)
Requirement already satisfied: certifi==2023.7.22 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 11)) (2023.7.22)
Requirement already satisfied: charset-normalizer==3.3.0 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 13)) (3.3.0)
Requirement already satisfied: click==8.1.7 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 15)) (8.1.7)
Requirement already satisfied: flask==3.0.0 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 17)) (3.0.0)
Requirement already satisfied: flask-cors==4.0.0 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 21)) (4.0.0)
Requirement already satisfied: idna==3.4 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 23)) (3.4)
Requirement already satisfied: importlib-metadata==6.8.0 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 25)) (6.8.0)
Requirement already satisfied: inquirerpy==0.3.4 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 27)) (0.3.4)
Requirement already satisfied: isodate==0.6.1 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 29)) (0.6.1)
Requirement already satisfied: itsdangerous==2.1.2 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 33)) (2.1.2)
Requirement already satisfied: jinja2==3.1.2 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 35)) (3.1.2)
Requirement already satisfied: linkify-it-py==2.0.2 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 37)) (2.0.2)
Requirement already satisfied: markdown-it-py[linkify,plugins]==3.0.0 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 39)) (3.0.0)
Requirement already satisfied: markupsafe==2.1.3 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 44)) (2.1.3)
Requirement already satisfied: mdit-py-plugins==0.4.0 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 48)) (0.4.0)
Requirement already satisfied: mdurl==0.1.2 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 50)) (0.1.2)
Requirement already satisfied: numpy==1.26.1 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 52)) (1.26.1)
Requirement already satisfied: paho-mqtt==1.6.1 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 54)) (1.6.1)
Requirement already satisfied: pfzy==0.3.4 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 56)) (0.3.4)
Requirement already satisfied: plotext==5.2.8 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 58)) (5.2.8)
Requirement already satisfied: prompt-toolkit==3.0.39 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 62)) (3.0.39)
Requirement already satisfied: pygments==2.16.1 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 64)) (2.16.1)
Requirement already satisfied: pyparsing==3.1.1 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 66)) (3.1.1)
Requirement already satisfied: python3-dtls==1.3.0 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 68)) (1.3.0)
Requirement already satisfied: rdflib==7.0.0 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 70)) (7.0.0)
Requirement already satisfied: requests==2.31.0 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 72)) (2.31.0)
Requirement already satisfied: rich==13.6.0 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 74)) (13.6.0)
Requirement already satisfied: shapely==2.0.2 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 78)) (2.0.2)
Requirement already satisfied: six==1.16.0 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 80)) (1.16.0)
Requirement already satisfied: textual==0.40.0 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 82)) (0.40.0)
Requirement already satisfied: textual-plotext==0.1.0 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 86)) (0.1.0)
Requirement already satisfied: tinydb==4.8.0 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 88)) (4.8.0)
Requirement already satisfied: typing-extensions==4.8.0 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 90)) (4.8.0)
Requirement already satisfied: uc-micro-py==1.0.2 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 92)) (1.0.2)
Requirement already satisfied: urllib3==2.0.7 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 94)) (2.0.7)
Requirement already satisfied: waitress==2.1.2 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 96)) (2.1.2)
Requirement already satisfied: wcwidth==0.2.8 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 98)) (0.2.8)
Requirement already satisfied: werkzeug==3.0.1 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 100)) (3.0.1)
Requirement already satisfied: zipp==3.17.0 in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 102)) (3.17.0)
Requirement already satisfied: colorama in c:\users\synctechno\appdata\local\programs\python\python312\lib\site-packages (from click==8.1.7->-r requirements.txt (line 15)) (0.4.6)

[notice] A new release of pip is available: 23.2.1 -> 23.3.1
[notice] To update, run: python.exe -m pip install --upgrade pip

Do you want to start ACME now? [Y/n] y

One or more required packages or modules (distutils) could not be found.
Please install the missing packages, e.g. by running the following command:

        C:\Users\synctechno\AppData\Local\Programs\Python\Python312\python.exe -m pip install -r requirements.txt

Do you want to install the missing packages now? [y/N] 
ankraft commented 9 months ago

Thanks for reporting this.

Python version: 3.12.1

Could you please try Python 3.11.x ?

One or more required packages or modules (distutils) could not be found.

The problem is that the "distutils" package is not part of Python 3.12 anymore, but some of the external packages still use it. I want to give them some time to fix this issue before I will look for a workaround.

ankraft commented 9 months ago

It turned out the import of "distutils" happens somewhere in ACME's code. I will fix this and a couple of other error that show up for Python 3.12 in the next release. Until then, please use Python 3.11.

sherzod-sync commented 9 months ago

Thanks Andreas. It works on Python 3.11.

ankraft commented 9 months ago

Thanks again for reporting it.
I added a warning to the Installation instructions. There seem to be more breaking errors for 3.12 than I expected.

ankraft commented 8 months ago

I made some necessary changes regarding Python 3.12 and committed them to the development branch. Python 3.12 is still a rather new release and I recommend to use 3.11 for some time, but 3.12 should work now.

ankraft commented 3 months ago

This should be now handled by the latest release