UBUNTU 20.04 GeoNode项目安装:python setup.py egg_info 未成功运行

UBUNTU 20.04 GeoNode项目安装:python setup.py egg_info 未成功运行

我正在尝试按照本指南在 Ubuntu 20.04 上安装 GeoNode 项目https://docs.geonode.org/en/master/install/advanced/project/index.html

然而,当我进入这一部分时:

安装 Python 包

cd /opt/geonode_custom/my_geonode

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

pip install -e src/ --upgrade**

此命令失败并显示:

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

我没有更新点子因为在之前的安装中我确实更新了软件包但出现了这个错误:

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.

以下是文件/opt/geonode_custom/geonode项目/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,
)

正如我上面所说,升级软件包后我收到此错误“geonode 4.0.1.dev0....”,但在这个文件setup.py上它显示版本=“4.0.0”,这跟错误有关系吗?我试过改,但是没用。

我完全迷路了,有人能帮忙吗?

谢谢

胡利奥

答案1

我放弃了这个安装。相反,我按照 GeoNode 的文档在 Ubuntu 22.04 上成功安装,解决了这个问题项目

相关内容