[GeoNode-users] Geonode Install - UWSGI fails to start, no module 'encodings'

Russell Mercer rmercer at getspatial.com
Mon Mar 18 02:49:09 PDT 2024


HI,

I have been trying to install Geonode on Ubuntu 22.04, using various 
permutations of the following methods:

https://docs.geonode.org/en/master/install/advanced/core/index.html#geonode-installation

https://training.geonode.geosolutionsgroup.com/master/GN3/basic_install/web_server/index.html

In both situations, I have gotten Geoserver installed, and GeoNode 
installed and am able to verify it started up using command line.

I am trying to enable UWSGI and am receiving a fatal python error:

--------------------

Sun Mar 17 22:23:23 2024 - Set PythonHome to 
/home/ubuntu/.virtualenvs/geonode
Python path configuration:
   PYTHONHOME = '/home/ubuntu/.virtualenvs/geonode'
   PYTHONPATH = (not set)
   program name = '/home/ubuntu/.virtualenvs/geonode/bin/python'
   isolated = 0
   environment = 1
   user site = 1
   import site = 1
   sys._base_executable = '/home/ubuntu/.virtualenvs/geonode/bin/python'
   sys.base_prefix = '/home/ubuntu/.virtualenvs/geonode'
   sys.base_exec_prefix = '/home/ubuntu/.virtualenvs/geonode'
   sys.platlibdir = 'lib'
   sys.executable = '/home/ubuntu/.virtualenvs/geonode/bin/python'
   sys.prefix = '/home/ubuntu/.virtualenvs/geonode'
   sys.exec_prefix = '/home/ubuntu/.virtualenvs/geonode'
   sys.path = [
     '/home/ubuntu/.virtualenvs/geonode/lib/python310.zip',
     '/home/ubuntu/.virtualenvs/geonode/lib/python3.10',
     '/home/ubuntu/.virtualenvs/geonode/lib/python3.10/lib-dynload',
   ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of 
the filesystem encoding
Python runtime state: core initialized

ModuleNotFoundError: No module named 'encodings'

--------------------------

 From what I have read, this is possibly related to the PYTHONHOME 
variable being set and pointing to the wrong location.  I don't know 
what to do to fix it, or where to change that setting so that it points 
to the correct version of python.

Here are the stats of my server:
AWS EC2- Ubunto 22.04
Python 3.10.12
GDAL 3.6.4
Java - openjdk 11.0.22
UWSGI - 2.0.20-debian
Geonode - 4.2.x

I've tried and failed about 7 different times to install and get this 
working, and have yet to get a working Geonode install.  I'm not sure 
what else to do at this point, so hoping someone can point me in the 
right direction.

Any assistance would be very much appreciated.

Thanks,
Russell




More information about the geonode-users mailing list