Score:0

UBUNTU 20.04 GeoNode Project installation: python setup.py egg_info did not run successfully

bb flag

I'm trying to install GeoNode Project on Ubuntu 20.04 following this guide https://docs.geonode.org/en/master/install/advanced/project/index.html

However, when I get to this section:

Install the Python packages

cd /opt/geonode_custom/my_geonode

pip install -r src/requirements.txt --upgrade

pip install -e src/ --upgrade**

This command fails with :

Obtaining file:///opt/geonode_custom/geonode-project/src
  
Preparing metadata (setup.py) ... error
  
error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  
    │exit code: 1
  ╰─> [2 lines of output]
      running egg_info
      error: Invalid distribution name or version syntax: -project-name--4.0.0
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

[notice] A new release of pip available: 22.2.2 -> 22.3.1
[notice] To update, run: pip install --upgrade pip

I didn't update pip because in a previous installation I did update the packages and I got this error:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.

geonode 4.0.1.dev0 requires Django==3.2.15, but you have django 3.2.13 which is incompatible.

geonode 4.0.1.dev0 requires pip==22.2.2, but you have pip 22.3.1 which is incompatible.

geonode 4.0.1.dev0 requires urllib3==1.26.12, but you have urllib3 1.26.13 which is incompatible.

This below is the file /opt/geonode_custom/geonode-project/src/setup.py:

import os

from distutils.core import setup

from setuptools import find_packages


def read(*rnames):
    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()

setup(
    
name="{{ project_name }}",
    
version="4.0.0",
    
author="",
    
author_email="",
    
description="{{ project_name }}, based on GeoNode",
    
long_description=(read('README.md')),
    
# Full list of classifiers can be found at: 
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
    
classifiers=[
        
'Development Status :: 1 - Planning',
    ],
    
license="GPL",
    
keywords="{{ project_name }} geonode django",
    
url='https://github.com/{{ project_name }}/{{ project_name }}',
    
packages=find_packages(),
    
dependency_links=[

        "git+https://github.com/GeoNode/geonode.git#egg=geonode"
    ],
    include_package_data=True,
)

As I said above, after upgrading packages I got this error "geonode 4.0.1.dev0 ....", but on this file setup.py it shows version="4.0.0", is this related to the error? I tried to change it to no avail.

I'm completely lost, will someone help?

Thank you

Julio

Sad3ng avatar
vn flag
you need to change your ubuntugis repository from stable to unstable, check this [Final updated Manual](https://github.com/GeoNode/documentation/issues/76) thread.
jquadros avatar
bb flag
Hi, I've tried to follow your advice and instead of "sudo add-apt-repository ppa:ubuntugis/ppa" I used "sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable". However, when I started installing the packages for the GeoNode Core, "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", I got these errors: 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
jquadros avatar
bb flag
something is very wrong in this document https://docs.geonode.org/en/master/install/advanced/project/index.html and I am completely stuck :(
Sad3ng avatar
vn flag
to install `gdal` from unstable repo run `apt install gdal` check this list of ubuntugis-unstable [packages](https://launchpad.net/~ubuntugis/+archive/ubuntu/ubuntugis-unstable/+packages?field.name_filter=&field.status_filter=published&field.series_filter=focal).
Score:0
bb flag

I gave up on this installation. Instead, I resolved it by successfully installing on Ubuntu 22.04 following the docs for GeoNode Core and Project.

NotTheDr01ds avatar
vn flag
Questions are typically only "closed" when there are serious problems with the *question itself* that can't be fixed by edits. In your case, you've found a "resolution" to your problem, so you've done the right thing by posting it. When you visit again, you should be able to accept your own answer here. That should prevent the question from being "bumped" in the future. Thanks!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.