geonode
geonode copied to clipboard
Unable to install Geonode following the official basic instruction on Ubuntu 18.0.4
./docker-build.sh fails in the following state
Successfully built humanize Installing collected packages: tornado, humanize, flower Successfully installed flower-0.9.4 humanize-0.5.1 tornado-6.1 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv WARNING: You are using pip version 21.2.1; however, version 21.2.4 is available. You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command. Removing intermediate container df9e0cf8ab02 ---> 3c2220ee900d Step 27/32 : RUN pip install --upgrade -e . ---> Running in 44616fa106a5 Obtaining file:///usr/src/%7B%7Bproject_name%7D%7D ERROR: Command errored out with exit status 1: command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/usr/src/{{project_name}}/setup.py'"'"'; file='"'"'/usr/src/{{project_name}}/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-3dz61pj1 cwd: /usr/src/{{project_name}}/ Complete output (2 lines): running egg_info error: Invalid distribution name or version syntax: -project-name--3.2.1 ---------------------------------------- WARNING: Discarding file:///usr/src/%7B%7Bproject_name%7D%7D. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. WARNING: You are using pip version 21.2.1; however, version 21.2.4 is available. You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command. ERROR: Service 'django' failed to build: The command '/bin/sh -c pip install --upgrade -e .' returned a non-zero code: 1 Creating network "projectname_default" with the default driver Creating volume "{{project_name}}-tmp" with default driver ERROR: create {{project_name}}-tmp: "{{project_name}}-tmp" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all images without at least one container associated to them
- all build cache
Are you sure you want to continue? [y/N] N (my_geonode) webgis@pc-webgis:~/geonode-project$
Hello,
I am facing exactly the same issue. It looks like there is a conflict with version names in some config file (maybe version name stated in the script "3.2.1" may not be compatible with the cloned version 3.2.x). I am using Ubuntu 20.04.3 LTS. Following the install procedure I face 2 errors.
Error 1: error installing required packages
During the package installation cf. DOCUMENTATION , the following did not work
sudo apt install -y python3-gdal=3.3.2+dfsg-2~focal2 gdal-bin=3.3.2+dfsg-2~focal2 libgdal-dev=3.3.2+dfsg-2~focal2
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '3.3.2+dfsg-2~focal2' for 'python3-gdal' was not found
E: Version '3.3.2+dfsg-2~focal2' for 'gdal-bin' was not found
E: Version '3.3.2+dfsg-2~focal2' for 'libgdal-dev' was not found
I did instead:
sudo apt install -y python3-gdal gdal-bin libgdal-dev
This seems to work, however I don't know If this can have a negative impact on error 2
Error 2: error running ./docker-build.sh
Here is the error message I get when i run ./docker-build.sh
:
Step 27/32 : RUN pip install --upgrade -e .
---> Running in 2ad332fc5b68
Obtaining file:///usr/src/%7B%7Bproject_name%7D%7D
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/usr/src/{{project_name}}/setup.py'"'"'; __file__='"'"'/usr/src/{{project_name}}/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-qum8rn1s
cwd: /usr/src/{{project_name}}/
Complete output (2 lines):
running egg_info
error: Invalid distribution name or version syntax: -project-name--3.2.1
----------------------------------------
WARNING: Discarding file:///usr/src/%7B%7Bproject_name%7D%7D. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 21.3.1; however, version 22.0.3 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
ERROR: Service 'django' failed to build: The command '/bin/sh -c pip install --upgrade -e .' returned a non-zero code: 1
Creating volume "{{project_name}}-statics" with default driver
ERROR: create {{project_name}}-statics: "{{project_name}}-statics" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path
WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all images without at least one container associated to them
- all build cache
Prior to this message, i also have several time this WARNING:
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.3.1; however, version 22.0.3 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
I tried to run this inside my virtual env:
python -m pip install --upgrade pip
Upgrading pip
works inside the virtual env, however, the WARNING mentionned above still remain when ./docker-build.sh
is launched.
Several questions then:
- Is there a quick fix known to this problem ?
- Did someone experienced recently a successful deployment ?
- Which environment configuration was used ?
- Could a docker image inside ubuntu 20.04 with the whole installation complete and stable be a suitable option to facilitate the installation process ?
Hello,
I am facing exactly the same issue. It looks like there is a conflict with version names in some config file (maybe version name stated in the script "3.2.1" may not be compatible with the cloned version 3.2.x). I am using Ubuntu 20.04.3 LTS.
NOTE: during the package installation cf. DOCUMENTATION , the following did not work
sudo apt install -y python3-gdal=3.3.2+dfsg-2~focal2 gdal-bin=3.3.2+dfsg-2~focal2 libgdal-dev=3.3.2+dfsg-2~focal2 Reading package lists... Done Building dependency tree Reading state information... Done E: Version '3.3.2+dfsg-2~focal2' for 'python3-gdal' was not found E: Version '3.3.2+dfsg-2~focal2' for 'gdal-bin' was not found E: Version '3.3.2+dfsg-2~focal2' for 'libgdal-dev' was not found
I did instead:
sudo apt install -y python3-gdal gdal-bin libgdal-dev
Here is the error message I get when i run
./docker-build.sh
:Step 27/32 : RUN pip install --upgrade -e . ---> Running in 2ad332fc5b68 Obtaining file:///usr/src/%7B%7Bproject_name%7D%7D Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'error' ERROR: Command errored out with exit status 1: command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/usr/src/{{project_name}}/setup.py'"'"'; __file__='"'"'/usr/src/{{project_name}}/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-qum8rn1s cwd: /usr/src/{{project_name}}/ Complete output (2 lines): running egg_info error: Invalid distribution name or version syntax: -project-name--3.2.1 ---------------------------------------- WARNING: Discarding file:///usr/src/%7B%7Bproject_name%7D%7D. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. WARNING: You are using pip version 21.3.1; however, version 22.0.3 is available. You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command. ERROR: Service 'django' failed to build: The command '/bin/sh -c pip install --upgrade -e .' returned a non-zero code: 1 Creating volume "{{project_name}}-statics" with default driver ERROR: create {{project_name}}-statics: "{{project_name}}-statics" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path WARNING! This will remove: - all stopped containers - all networks not used by at least one container - all images without at least one container associated to them - all build cache
Prior to this message, i also have several time this WARNING:
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv WARNING: You are using pip version 21.3.1; however, version 22.0.3 is available. You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
I tried to run this inside my virtual env:
python -m pip install --upgrade pip
Upgrading
pip
works inside the virtual env, however, the WARNING mentionned above still remain when./docker-build.sh
is launched.Several questions then:
- Is there a quick fix known to this problem ?
- Did someone experienced recently a successful deployment ?
- Which environment configuration was used ?
- Could a docker image inside ubuntu 20.04 with the whole installation complete and stable be a suitable option to facilitate the installation process ?
My workaround to this was to compile/build GDAL version 3.3.2 from source. I first downloaded PROJ greater that version 6 from here, compiled using the instructions specified here then downloaded GDAL 3.3.2 from here and compiled it using instructions from here and finally installed Python 3.8 using apt install python3.8
and set it as default python then finally followed the official documentation 's instructions. It is quite a long process but works like a charm. I hope this information will help out.
Thank you @jkariukidev for your answer, did that solved also the Error 2 mentionned in my previous comment (now edited) ?
I figured out that the following process is working on CentOS 7 (by making proper changes inside the .env file):
git clone https://github.com/GeoNode/geonode.git geonode
cd ./geonode
git checkout -b 3.3.x
#Replace domain name inside .env file
docker-compose pull
docker-compose up --build
If geonode has been already tested with docker, I recommend running the following command to make a clean start with docker. Be careful, this will remove ALL containers, images and volumes
docker-compose down
docker container rm $(docker container ls)
docker volume rm $(docker volume ls)
docker rmi $(docker image ls)
Maybe this second part could be added as a NOTE inside documentation ?