ClusterLabs/pcs

importlib_metadata.PackageNotFoundError: No package metadata was found for pcs

Closed this issue · 4 comments

1、when i exec command,it comes an error.

[root@192 /]# /usr/sbin/pcsd 
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 381, in from_name
    return next(cls.discover(name=name))
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/sbin/pcsd", line 33, in <module>
    sys.exit(load_entry_point('pcs==0.10.14', 'console_scripts', 'pcsd')())
  File "/usr/sbin/pcsd", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
  File "/usr/local/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 805, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/local/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 383, in from_name
    raise PackageNotFoundError(name)
importlib_metadata.PackageNotFoundError: No package metadata was found for pcs

2、so i install metadata,the error is reported as follows

 [root@192 yum.repos.d]# pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ metadata
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting metadata
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/8a/2b/3982e589808af51d6e8d3f7ebb6c540005ad3466d1e4939e57d25cd1d3c0/metadata-0.2.tar.gz (1.5 kB)
  Preparing metadata (setup.py) ... done
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/cd/ae/bd9c209313be8d9f794089439246c667e82bc6770f306143f4cb88251294/metadata-0.1.1.tar.gz (1.5 kB)
  Preparing metadata (setup.py) ... done
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/72/d2/6b26fa0d9e0a43e6a1182c32bcc4e2854d3dc42b5bb3a61e882635bb910a/metadata-0.1.tar.gz (1.1 kB)
  Preparing metadata (setup.py) ... done
ERROR: Cannot install metadata==0.1, metadata==0.1.1 and metadata==0.2 because these package versions have conflicting dependencies.

The conflict is caused by:
    metadata 0.2 depends on hachoir-core==1.3.3
    metadata 0.1.1 depends on hachoir-core==1.3.3
    metadata 0.1 depends on hachoir-core==1.3.3

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

any ideas?

Hi @ashore1992,

The error doesn't mean you are missing metadata package. It says that you are missing metadata of pcs package. Can you share how you installed / built pcs?

Hi @ashore1992,

The error doesn't mean you are missing metadata package. It says that you are missing metadata of pcs package. Can you share how you installed / built pcs?

thanks for your reply,you are right,the problem was not missing metadata package.Default install path of pcs was /usr/lib/python3.7/site-packages/pcs,so i changed it to /usr/local/lib/python3.7/site-packages/pcs,now,the error fixed,but it comes new errors like below.Please help me.
20230407.txt

Try installing openssl and curl devel packages. I'm not sure how they are called in your distribution, it's openssl-devel and libcurl-devel in RHEL / CentOS. Then try installing pycurl like this:

pip uninstall pycurl
export PYCURL_SSL_LIBRARY=nss
pip install --no-cache-dir --compile pycurl

I'm closing this issue for inactivity. Feel free to reopen it if you have further questions.