sighingnow / libclang

(Unofficial) Release libclang (clang.cindex) on pypi.
https://pypi.org/project/libclang
Other
84 stars 21 forks source link

ERROR: No matching distribution found for libclang>=9.0.1 (from tensorflow) #22

Closed FranklinBao closed 2 years ago

FranklinBao commented 2 years ago

Failed installing in docker container: registry.baidubce.com/paddlepaddle/paddle:2.2.2-gpu-cuda11.2-cudnn8 dockerfile is here: https://registry.hub.docker.com/layers/paddlepaddle/paddle/2.2.2-gpu-cuda11.2-cudnn8/images/sha256-09603d35054766f0d328ab4368a5eb8dbf92d0802041308992df1db41601e817?context=explore

FranklinBao commented 2 years ago

This is an image based on Ubuntu 18.04 running on x64 cpu

sighingnow commented 2 years ago

Hi @FranklinBao,

I cannot reproduce the failure in ubuntu:18.04 docker container, with the following command to setup,

apt-get update
apt-get install -y python3-pip
pip3 install libclang

and the following code to verify:

import clang.cindex
clang.cindex.Index.create()

Could you please provide more information, e.g., the error message, about the failure?

FranklinBao commented 2 years ago

docker pull registry.baidubce.com/paddlepaddle/paddle:2.2.2-gpu-cuda11.2-cudnn8 for pull the image and docker run --name paddle -it -v $PWD:/paddle registry.baidubce.com/paddlepaddle/paddle:2.2.2-gpu-cuda11.2-cudnn8 /bin/bash to start the container. The error can be reproduce by pip install tensorflow==2.7 or simply pip install tensorflow the error message was

ERROR: Could not find a version that satisfies the requirement libclang (from versions: none)
ERROR: No matching distribution found for libclang
截屏2022-03-09 19 53 44
sighingnow commented 2 years ago

I believe it is a bug about pip==20.0.1 in this docker environment, see also https://github.com/pypa/pip/issues/7629.

The installation process should go as expected after upgrade the pip inside the container by pip3 install -U pip.

sighingnow commented 2 years ago

Close as resolved.

FranklinBao commented 2 years ago

I sincerely thank you for your response. That solved the problem.