簡體   English   中英

錯誤:找不到匹配的發行版和錯誤:找不到滿足要求的版本

[英]ERROR: No matching distribution found and ERROR: Could not find a version that satisfies the requirement

我試圖在py -m virtualenv objectremoval命令創建的虛擬環境中安裝 GitHub 克隆的要求,但我總是遇到“找不到滿足要求的版本”錯誤。 克隆 repo 后,我執行了以下幾行;

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/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
.
.
.
.

如果我在主虛擬環境文件夾中執行它們where pythonwhere 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

但是,如果我在 Scripts 文件夾中執行where pythonwhere pip命令,它會添加一個額外的路徑:

(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

嘗試將軟件包安裝在主文件夾和 Scripts 文件夾中都沒有給我想要的結果。

我的 requirements.txt 文件僅包含以下包:

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

另外,我嘗試升級 pip、setuptools 和 wheel 版本。 我還嘗試通過conda create -n <venvname>命令使用 conda 創建虛擬環境,並嘗試了幾個不同的 python 版本,但這些也沒有幫助。 你能幫我解決這個問題嗎? 感謝您的寶貴時間。

Python: 3.10.2
OS: Windows10 x64 Pro

親切的問候,

選擇的名為Deep-Object-Removal的包似乎非常過時(上次提交 4 年前)並且不再維護,我建議搜索任何當前支持的替代方案。

如果您嘗試在干凈的 python venv (使用python3.10 )中安裝此版本的opencv_python ,則會收到錯誤消息:

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. 猛拉
另外沒有pkg。 對於python3.10 ,最后一個支持 whl 文件似乎是python3.6
您可以嘗試使用較新的opencv_python調整requirements.txt或安裝python3.6並手動下載特定版本並安裝whl文件,(但這可能會導致新的錯誤)。 但我再次建議使用另一個當前支持的包而不是 Deep-Object-Removal。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM