错误:找不到匹配的分布和错误:找不到满足要求的版本

发布于 2025-02-10 17:25:14 字数 6249 浏览 0 评论 0 原文

我正在尝试在由 py -m virtualenv objectRemoval 命令创建的虚拟环境中安装github克隆的要求,但是我总是遇到“找不到满足要求的版本”错误。克隆回购后,我执行了以下几行。

D:\test1\Deep-Object-Removal>py -m virtualenv objectremoval
created virtual environment CPython3.10.2.final.0-64 in 1474ms
  creator CPython3Windows(dest=D:\test1\Deep-Object-Removal\objectremoval, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\user\AppData\Local\pypa\virtualenv)
    added seed packages: pip==22.1.2, setuptools==62.6.0, wheel==0.37.1
  activators BashActivator,BatchActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

D:\test1\Deep-Object-Removal>cd objectremoval\Scripts

D:\test1\Deep-Object-Removal\objectremoval\Scripts>activate

(objectremoval) D:\test1\Deep-Object-Removal\objectremoval\Scripts>cd ..

(objectremoval) D:\test1\Deep-Object-Removal\objectremoval>cd ..

(objectremoval) D:\test1\Deep-Object-Removal>pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement opencv_python==3.3.0.10 (from versions: 3.4.0.14, 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 3.4.13.47, 3.4.15.55, 3.4.16.57, 3.4.16.59, 3.4.17.61, 3.4.17.63, 3.4.18.65, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4.5.5.62, 4.5.5.64, 4.6.0.66)
ERROR: No matching distribution found for opencv_python==3.3.0.10

(objectremoval) D:\test1\Deep-Object-Removal>pip install opencv_python==3.3.0.10
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement opencv_python==3.3.0.10 (from versions: 3.4.0.14, 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 3.4.13.47, 3.4.15.55, 3.4.16.57, 3.4.16.59, 3.4.17.61, 3.4.17.63, 3.4.18.65, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4.5.5.62, 4.5.5.64, 4.6.0.66)
ERROR: No matching distribution found for opencv_python==3.3.0.10

(objectremoval) D:\test1\Deep-Object-Removal>pip3 install opencv_python==3.3.0.10
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement opencv_python==3.3.0.10 (from versions: 3.4.0.14, 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 3.4.13.47, 3.4.15.55, 3.4.16.57, 3.4.16.59, 3.4.17.61, 3.4.17.63, 3.4.18.65, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4.5.5.62, 4.5.5.64, 4.6.0.66)
ERROR: No matching distribution found for opencv_python==3.3.0.10

(objectremoval) D:\test1\Deep-Object-Removal>py -m pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement opencv_python==3.3.0.10 (from versions: 3.4.0.14, 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 3.4.13.47, 3.4.15.55, 3.4.16.57, 3.4.16.59, 3.4.17.61, 3.4.17.63, 3.4.18.65, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4.5.5.62, 4.5.5.64, 4.6.0.66)
ERROR: No matching distribution found for opencv_python==3.3.0.10

(objectremoval) D:\test1\Deep-Object-Removal>pip install tensorflow==1.10.1
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement tensorflow==1.10.1 (from versions: 2.8.0rc1, 2.8.0, 2.8.1, 2.8.2, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0, 2.9.1)
ERROR: No matching distribution found for tensorflow==1.10.1

(objectremoval) D:\test1\Deep-Object-Removal>pip install numpy==1.13.3

对于Numpy来说,错误太长了,您可以使用此超链接找到它: https://justpaste.it.it/7vxkv

另外,检查本地套件在全球环境中显示我所有安装的软件包。我认为这也是一个相关的问题。

(objectremoval) D:\test1\Deep-Object-Removal>pip list --local
Package                      Version
---------------------------- -------------------
absl-py                      1.0.0
argon2-cffi                  21.3.0
argon2-cffi-bindings         21.2.0
asttokens                    2.0.5
astunparse                   1.6.3
attrs                        21.4.0
backcall                     0.2.0
beautifulsoup4               4.11.1
black                        22.1.0
bleach                       5.0.0
cachetools                   5.0.0
certifi                      2021.10.8
cffi                         1.15.0
.
.
.
.

另外, python pip 命令如果在主虚拟环境文件夹中执行它们,则不会显示虚拟环境路径。

(objectremoval) D:\test1\Deep-Object-Removal>where python
C:\Program Files\Python310\python.exe
C:\Users\user\miniconda3\python.exe
C:\Users\user\AppData\Local\Microsoft\WindowsApps\python.exe

(objectremoval) D:\test1\Deep-Object-Removal>where pip
C:\Program Files\Python310\Scripts\pip.exe
C:\Users\user\AppData\Roaming\Python\Python310\Scripts\pip.exe
C:\Users\user\miniconda3\Scripts\pip.exe

但是,如果我执行 python and ,pip 在脚本文件夹中命令 dip ,它会增加一个额外的路径:

(objectremoval) D:\test1\Deep-Object-Removal\objectremoval\Scripts>where pip
D:\test1\Deep-Object-Removal\objectremoval\Scripts\pip.exe
C:\Program Files\Python310\Scripts\pip.exe
C:\Users\user\AppData\Roaming\Python\Python310\Scripts\pip.exe
C:\Users\user\miniconda3\Scripts\pip.exe

(objectremoval) D:\test1\Deep-Object-Removal\objectremoval\Scripts>where python
D:\test1\Deep-Object-Removal\objectremoval\Scripts\python.exe
C:\Program Files\Python310\python.exe
C:\Users\user\miniconda3\python.exe
C:\Users\user\AppData\Local\Microsoft\WindowsApps\python.exe

既不尝试在主文件夹中也不试图在脚本文件夹中安装软件包给了我理想的结果。

我的需求.txt文件仅包含以下软件包:

opencv_python==3.3.0.10
tensorflow==1.10.1
numpy==1.13.3

另外,我尝试升级PIP,setuptools和wheel版本。我还尝试使用 conda conta create -n< venvname> 命令创建虚拟环境,并尝试了几种不同的python版本,但是这些版本也无济于事。您能帮我解决问题吗?谢谢您的宝贵时间。

Python: 3.10.2
OS: Windows10 x64 Pro

亲切的问候,

I'm trying to install the requirements of a GitHub clone in a virtual environment created by py -m virtualenv objectremoval command, but I always encounter the "Could not find a version that satisfies the requirement" Error. After cloning the repo, I performed the following lines;

D:\test1\Deep-Object-Removal>py -m virtualenv objectremoval
created virtual environment CPython3.10.2.final.0-64 in 1474ms
  creator CPython3Windows(dest=D:\test1\Deep-Object-Removal\objectremoval, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\user\AppData\Local\pypa\virtualenv)
    added seed packages: pip==22.1.2, setuptools==62.6.0, wheel==0.37.1
  activators BashActivator,BatchActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

D:\test1\Deep-Object-Removal>cd objectremoval\Scripts

D:\test1\Deep-Object-Removal\objectremoval\Scripts>activate

(objectremoval) D:\test1\Deep-Object-Removal\objectremoval\Scripts>cd ..

(objectremoval) D:\test1\Deep-Object-Removal\objectremoval>cd ..

(objectremoval) D:\test1\Deep-Object-Removal>pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement opencv_python==3.3.0.10 (from versions: 3.4.0.14, 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 3.4.13.47, 3.4.15.55, 3.4.16.57, 3.4.16.59, 3.4.17.61, 3.4.17.63, 3.4.18.65, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4.5.5.62, 4.5.5.64, 4.6.0.66)
ERROR: No matching distribution found for opencv_python==3.3.0.10

(objectremoval) D:\test1\Deep-Object-Removal>pip install opencv_python==3.3.0.10
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement opencv_python==3.3.0.10 (from versions: 3.4.0.14, 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 3.4.13.47, 3.4.15.55, 3.4.16.57, 3.4.16.59, 3.4.17.61, 3.4.17.63, 3.4.18.65, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4.5.5.62, 4.5.5.64, 4.6.0.66)
ERROR: No matching distribution found for opencv_python==3.3.0.10

(objectremoval) D:\test1\Deep-Object-Removal>pip3 install opencv_python==3.3.0.10
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement opencv_python==3.3.0.10 (from versions: 3.4.0.14, 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 3.4.13.47, 3.4.15.55, 3.4.16.57, 3.4.16.59, 3.4.17.61, 3.4.17.63, 3.4.18.65, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4.5.5.62, 4.5.5.64, 4.6.0.66)
ERROR: No matching distribution found for opencv_python==3.3.0.10

(objectremoval) D:\test1\Deep-Object-Removal>py -m pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement opencv_python==3.3.0.10 (from versions: 3.4.0.14, 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 3.4.13.47, 3.4.15.55, 3.4.16.57, 3.4.16.59, 3.4.17.61, 3.4.17.63, 3.4.18.65, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4.5.5.62, 4.5.5.64, 4.6.0.66)
ERROR: No matching distribution found for opencv_python==3.3.0.10

(objectremoval) D:\test1\Deep-Object-Removal>pip install tensorflow==1.10.1
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement tensorflow==1.10.1 (from versions: 2.8.0rc1, 2.8.0, 2.8.1, 2.8.2, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0, 2.9.1)
ERROR: No matching distribution found for tensorflow==1.10.1

(objectremoval) D:\test1\Deep-Object-Removal>pip install numpy==1.13.3

The Error was too long for numpy, you can find it with this hyperlink:
https://justpaste.it/7vxkv

Also, checking the local packages shows me all installed packages in the global environment. I think this is a relevant problem too.

(objectremoval) D:\test1\Deep-Object-Removal>pip list --local
Package                      Version
---------------------------- -------------------
absl-py                      1.0.0
argon2-cffi                  21.3.0
argon2-cffi-bindings         21.2.0
asttokens                    2.0.5
astunparse                   1.6.3
attrs                        21.4.0
backcall                     0.2.0
beautifulsoup4               4.11.1
black                        22.1.0
bleach                       5.0.0
cachetools                   5.0.0
certifi                      2021.10.8
cffi                         1.15.0
.
.
.
.

Also where python and where pip commands does not show the virtual environment paths if I execute them in the main virtual environment folder.

(objectremoval) D:\test1\Deep-Object-Removal>where python
C:\Program Files\Python310\python.exe
C:\Users\user\miniconda3\python.exe
C:\Users\user\AppData\Local\Microsoft\WindowsApps\python.exe

(objectremoval) D:\test1\Deep-Object-Removal>where pip
C:\Program Files\Python310\Scripts\pip.exe
C:\Users\user\AppData\Roaming\Python\Python310\Scripts\pip.exe
C:\Users\user\miniconda3\Scripts\pip.exe

However, it adds an extra path if I execute the where python and where pip commands in Scripts folder:

(objectremoval) D:\test1\Deep-Object-Removal\objectremoval\Scripts>where pip
D:\test1\Deep-Object-Removal\objectremoval\Scripts\pip.exe
C:\Program Files\Python310\Scripts\pip.exe
C:\Users\user\AppData\Roaming\Python\Python310\Scripts\pip.exe
C:\Users\user\miniconda3\Scripts\pip.exe

(objectremoval) D:\test1\Deep-Object-Removal\objectremoval\Scripts>where python
D:\test1\Deep-Object-Removal\objectremoval\Scripts\python.exe
C:\Program Files\Python310\python.exe
C:\Users\user\miniconda3\python.exe
C:\Users\user\AppData\Local\Microsoft\WindowsApps\python.exe

Neither trying to install the packages in the main folder nor in the Scripts folder gave me desired results.

My requirements.txt file includes only the following packages:

opencv_python==3.3.0.10
tensorflow==1.10.1
numpy==1.13.3

Also, I have tried to upgrade pip, setuptools, and wheel versions. I have also tried to create a virtual environment with conda by conda create -n <venvname> command, and tried several different python versions, but these were also not helpful. Can you please help me to solve the problem? Thank you for your valuable time.

Python: 3.10.2
OS: Windows10 x64 Pro

Kind regards,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

总以为 2025-02-17 17:25:14

所选的包装称为 deep-object-removal 似乎已经过时了)并且不再维护,我建议搜索任何当前支持的替代方案。

如果您尝试在干净的python venv中安装此版本的 opencv_python (带有 python3.10 ),您会遇到错误:

pip install opencv_python==3.3.0.10
ERROR: Could not find a version that satisfies the requirement opencv_python==3.3.0.10 (from versions: 3.4.0.14, 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 3.4.13.47, 3.4.15.55, 3.4.16.57, 3.4.16.59, 3.4.17.61, 3.4.17.63, 3.4.18.65, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4.5.5.62, 4.5.5.64, 4.6.0.66)
ERROR: No matching distribution found for opencv_python==3.3.0.10

如果您在 pypi,此版本的 opencv_python 您注意此版本的PKG。已经 yanked
其他没有PKG。对于 Python3.10 ,最后一个支持WHL文件似乎是用于 python3.6
您可以尝试使用 sumpliont.txt opencv_python 中的较新的适应或安装 python3.6 ,然后手工下载特定版本并安装 whl 文件(但这可能导致新的错误)。
但是,我再次建议使用另一个当前支持的软件包,而不是深度对象避免。

The chosen package called Deep-Object-Removal seems to be very outdated (last commit 4years ago) and not maintained any longer, i would suggest to search for any currently supported alternative.

If you try to install this version of opencv_python in a clean python venv (with python3.10) you get an error:

pip install opencv_python==3.3.0.10
ERROR: Could not find a version that satisfies the requirement opencv_python==3.3.0.10 (from versions: 3.4.0.14, 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 3.4.13.47, 3.4.15.55, 3.4.16.57, 3.4.16.59, 3.4.17.61, 3.4.17.63, 3.4.18.65, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4.5.5.62, 4.5.5.64, 4.6.0.66)
ERROR: No matching distribution found for opencv_python==3.3.0.10

If you have a look at the files at pypi for this version of opencv_python you notice that this version of the pkg. has been yanked.
Additional there is no pkg. for python3.10, the last support whl file seems to be for python3.6.
You can try to adapt the requirements.txt with a newer one of opencv_python or install python3.6 and download the specific version by hand and install the whl file,( but this may lead to new errors).
But again i would recommend to use another, currently supported package instead of Deep-Object-Removal.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文