paopre / Spontini

A text-combined-with-graphic music editor for creating professional scores with LilyPond
GNU General Public License v3.0
76 stars 7 forks source link

Could not find pip executable inside spontinivenv #5

Closed ksnortum closed 3 years ago

ksnortum commented 3 years ago

System: Ubuntu 20.04.

After starting the server, I get this error message:

2021-01-02 14:32:53 [I] Checking for virtual environment inside lib/python/spontinivenv
2021-01-02 14:32:53 [I] 
2021-01-02 14:32:53 [I] ----------------------------------------------
2021-01-02 14:32:53 [I] Spontini Server is completing its installation
2021-01-02 14:32:53 [I] This can take some time: please wait
2021-01-02 14:32:53 [I] ----------------------------------------------
2021-01-02 14:32:53 [I] 
2021-01-02 14:32:53 [I] Virtual environment missing. Creating a new one...
2021-01-02 14:32:54 [E] Could not create venv
2021-01-02 14:32:54 [E] 
2021-01-02 14:32:54 [E] The virtual environment was not created successfully because ensurepip is not
2021-01-02 14:32:54 [E] available.  On Debian/Ubuntu systems, you need to install the python3-venv
2021-01-02 14:32:54 [E] package using the following command.
2021-01-02 14:32:54 [E] 
2021-01-02 14:32:54 [E]     apt-get install python3-venv
2021-01-02 14:32:54 [E] 
2021-01-02 14:32:54 [E] You may need to use sudo with that command.  After installing the python3-venv
2021-01-02 14:32:54 [E] package, recreate your virtual environment.
2021-01-02 14:32:54 [E] 
2021-01-02 14:32:54 [E] Failing command: ['/home/<omitted>/Spontini/lib/python/spontinivenv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']
2021-01-02 14:32:54 [E] 
2021-01-02 14:32:54 [E] 
2021-01-02 14:32:54 [C] Installation not completed

After installing python3-venv and starting the server:

2021-01-02 14:36:29 [I] *** Initializing virtual environment ***
2021-01-02 14:36:29 [I] Checking for pip3
2021-01-02 14:36:30 [I] pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
2021-01-02 14:36:30 [I] 
2021-01-02 14:36:30 [I] Pip3 found
2021-01-02 14:36:30 [I] Checking for venv module
2021-01-02 14:36:30 [I] Venv found
2021-01-02 14:36:30 [E] Could not find pip executable inside spontinivenv
2021-01-02 14:36:30 [E] Make sure that both pip and venv are installed and run again the server
2021-01-02 14:36:30 [E] 
2021-01-02 14:36:30 [C] Installation not completed

There is no pip command, but there is a pip3 command:

$ which pip3
/usr/bin/pip3
paopre commented 3 years ago

This line

"2021-01-02 14:36:30 [E] Could not find pip executable inside spontinivenv"

tells that the directory "spontinivenv" exists (it is located inside lib/python of the Spontini directory tree), at the same level of "send_msg.py", "spontini_server_core.py" etc.

Please can you check again if there is such directory?

If you find it, delete it and run again the program.

Please give feedback for this!

Thanks

paopre commented 3 years ago

Note too that spontinivenv is inside lib/python of the Spontini directory tree, not the OS /lib

paopre commented 3 years ago

Finally:

if you don't find the directory, simply run again the program and please report the new error here

ksnortum commented 3 years ago

There is no such directory in lib/python:

$ pwd
/home/<omitted>/Spontini/lib/python
$ ll
total 84
drwxrwxr-x 2 knute knute  4096 Jan  2 14:28 __pycache__/
-rw-rw-r-- 1 knute knute   145 Jan  2 14:28 requirements.txt
-rw-rw-r-- 1 knute knute  1014 Jan  2 14:28 send_msg.py
-rw-rw-r-- 1 knute knute 39064 Jan  2 14:28 spontini_server_core.py
-rw-rw-r-- 1 knute knute 12455 Jan  2 14:28 spontini_server_utils.py
-rw-rw-r-- 1 knute knute  2181 Jan  2 14:28 spontini_server_webserver.py
-rw-rw-r-- 1 knute knute   924 Jan  2 14:28 uvicorn_cli.py
-rw-rw-r-- 1 knute knute    56 Jan  2 14:28 webserver.conf
-rw-rw-r-- 1 knute knute    98 Jan  2 14:28 webserver.conf.daphne
paopre commented 3 years ago

Thanks,

then, simply run again the program and report the new error here

ksnortum commented 3 years ago

The server started!

paopre commented 3 years ago

Good!

You tried to launch the server without installing it. Then the program fixed automatically the broken installation