Closed ManonFlt closed 1 year ago
Hi @ManonFlt.
If python is installed, i'm not sure why you would get this error...
One possibility is that you have python3 installed, rather than just python.
To fix that, please run apt install python-is-python3
. This package tells your computer that python3 can be called as python.
Hi @Theodlz I have another error with make db_init now and I can't find how to solve it
[!] Some system dependencies seem to be unsatisfied
The failed checks were:
- npm: `npm -v`
Required 8.3.2, found 6.14.5
- node: `node -v`
Required 16.14.0, found 14.4.0
Please refer to https://cesium-ml.org/baselayer for installation instructions.
make[1]: [baselayer/Makefile:44: dependencies] Error 255 make: [Makefile:74: db_init] Error 2
Well it just tells you that you version of node.js and npm is too old. Did you try installing a more recent one?
To do this you can use the npm module named n
. Its a node.js version manager.
Install it with sudo npm install -g n
.
Then install a new version of node.js by running n 18
.
Note: When you are done, you need to close the terminal and open a new one to be able to use the new version.
Now that I have the required versions, I have new errors about missing depedencies:
[✗] Verifying Python package dependencies The 'iminuit==2.15.2' distribution was not found and is required by the application ERROR: Double requirement given: selenium-requests>=1.4 (from -r baselayer/requirements.txt (line 18)) (already in selenium-requests>=2.0.0 (from -r baselayer/requirements.txt (line 11)), name='selenium-requests') make[1]: [baselayer/Makefile:45: dependencies] Error 1 make: [Makefile:74: db_init] Error 2
So I tried to install iminuit 2.15.2 and it gives me this error:
ERROR: Could not find a version that satisfies the requirement 2.15.2 (from versions: none) ERROR: No matching distribution found for 2.15.2
And if I install the latest version it doesn't work either
Could you paste here the code you ran when you tried to install it? Otherwise I can't tell what went wrong
I have solved the previous issue but now I have a new error with the command make db_init
[✗] Verifying Python package dependencies
pip 20.0.2 is installed but pip==22.2.2 is required
Traceback (most recent call last):
File "/home/manon/skyportal/skyportal_env/bin/pip", line 5, in
Ok so it tells you that pip is outdated (in the first lines). Did you try updating it?
I did sudo apt-get upgrade pip
which worked:
Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'python3-pip' instead of 'pip' python3-pip is already the newest version (20.0.2-5ubuntu1.6). Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
And pip --version
gives me:
pip 22.3 from /home/manon/skyportal/skyportal_env/lib/python3.8/site-packages/pip-22.3-py3.8.egg/pip (python 3.8)
Ok! So that updates pip as you want it too, however it does not upgrade the pip of the virtualenv you already created! To do that, enter the virtualenv (with source blablabla as mentionned in the tutorial) and run install --upgrade pip
Keep me posted! Good luck
Hello I tried to delete everything and restart the setup from the beginning, but I'm stuck again at the make db_init with the same error: Welcome to SkyPortal v0.9.dev0+git20221028.5760cbe8 (https://skyportal.io)
Checking system dependencies: [✓] nginx >= 1.7 [ 1.18.0] [✓] psql >= 12.0 [ 12.12] [✓] npm >= 8.3.2 [ 8.19.2] [✓] node >= 16.14.0 [ 18.12.0] [✓] python >= 3.8 [ 3.8.10]
[✗] Verifying Python package dependencies
pip 20.0.2 is installed but pip==22.2.2 is required
Traceback (most recent call last):
File "/home/manon/skyportal/skyportal_env/bin/pip", line 11, in
Even after running sudo apt install --upgrade pip
I still have a problem with pip:
pip 20.0.2 is installed but pip==22.2.2 is required
pip install pip==22.2.2
worked so now I have all the package dependencies
Great! Did the app start after that?
Again, you need to update pip and THEN create the virtualenv. Otherwise your virtual env will be using the old pip
I still have mistakes on make db_init, the database gets initialized but then the connection doesn't work:
Welcome to SkyPortal v0.9.dev0+git20221028.5760cbe8 (https://skyportal.io)
Checking system dependencies: [✓] nginx >= 1.7 [ 1.18.0] [✓] psql >= 12.0 [ 12.12] [✓] npm >= 8.3.2 [ 8.19.2] [✓] node >= 16.14.0 [ 18.12.0] [✓] python >= 3.8 [ 3.8.10]
[✓] Verifying Python package dependencies [✓] Silently executing: baselayer/tools/check_js_deps.sh
Initializing database: Config files: baselayer/config.yaml.defaults config.yaml.defaults config.yaml [22:20:29 db_init] Initializing databases [✓] Creating user [skyportal] [·] Creating database [skyportal] Warning: could not create db skyportal
You should create it manually by invoking createdb
.
Then, execute:
psql -U skyportal --no-password -h localhost -p 5432 -c "GRANT ALL PRIVILEGES ON DATABASE skyportal TO skyportal;" skyportal
[✓] Creating database [skyportal] [·] Creating database [skyportal_test] Warning: could not create db skyportal_test
You should create it manually by invoking createdb
.
Then, execute:
psql -U skyportal --no-password -h localhost -p 5432 -c "GRANT ALL PRIVILEGES ON DATABASE skyportal_test TO skyportal;" skyportal_test
[✓] Creating database [skyportal_test] [✗] Testing database connection to [skyportal]
!!! Error accessing database:
The most common cause of database connection errors is a
misconfigured pg_hba.conf
.
We tried to connect to the database with the following parameters:
database: skyportal username: skyportal host: localhost port: 5432
The postgres client exited with the following error message:
Please modify your pg_hba.conf
, and use the following command to
check your connection:
psql -U skyportal --no-password -h localhost -p 5432 -c 'SELECT 0;' skyportal
make[1]: [baselayer/Makefile:51: db_init] Error 1 make: [Makefile:74: db_init] Error 2
Did you change pg_hba.conf to read trust on all the lines?
https://skyportal.io/docs/setup.html
Or what does that file look like now?
Yes I did, it looks like this:
host skyportal skyportal ::1/128 trust host skyportal_test skyportal ::1/128 trust host all postgres ::1/128 trust
local all postgres peer
local all all peer
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
local replication all peer host replication all 127.0.0.1/32 md5 host replication all ::1/128 md5
I would personally set all to trust and restart postgres.
It worked thank you!
Yes I did, it looks like this:
host skyportal skyportal ::1/128 trust host skyportal_test skyportal ::1/128 trust host all postgres ::1/128 trust
Database administrative login by Unix domain socket
local all postgres peer
TYPE DATABASE USER ADDRESS METHOD
"local" is for Unix domain socket connections only
local all all peer
IPv4 local connections:
host all all 127.0.0.1/32 md5
IPv6 local connections:
host all all ::1/128 md5
Allow replication connections from localhost, by a user with the
replication privilege.
local replication all peer host replication all 127.0.0.1/32 md5 host replication all ::1/128 md5
@ManonFlt so if I understand well, you added the ipv6 config (::1/128) rather than the ipv4. Both are given in the setup documentation. Maybe I ask why you chose this one rather than the other? Just to figure out if something is not clear in the docs. Also, it's more likely to be the ipv4 that you need. ipv6 was only needed on the VM we use for production, but otherwise ipv4 should be fine on most machines.
here is my config (which I directly copied and pasted from the docs):
host skyportal skyportal 127.0.0.1/32 trust
host skyportal_test skyportal 127.0.0.1/32 trust
host all postgres 127.0.0.1/32 trust
But as Michael said, and as I mentioned during our first zoom, just allowing all connections is super fine for development, as we don't have any sensible data in the db (just demo data).
So you can keep your config as is if it works!
@ManonFlt if you are done with starting SkyPortal, please close this issue and move to the next step which is described in issue https://github.com/grandma-collaboration/skyportal_grandma_dev/issues/12
Hello! I am at the lauching part and the "make db_init" gives me the following error:
/bin/bash: python: command not found
Welcome to SkyPortal v (https://skyportal.io)
/usr/bin/env: ‘python’: No such file or directory make[1]: [baselayer/Makefile:44: dependencies] Error 127 make: [Makefile:74: db_init] Error 2