Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/357.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 在使用Pycharm的windows中使用pipenv安装flair和pytorch时出错_Python_Pytorch_Pipenv_Pipfile_Flair - Fatal编程技术网

Python 在使用Pycharm的windows中使用pipenv安装flair和pytorch时出错

Python 在使用Pycharm的windows中使用pipenv安装flair和pytorch时出错,python,pytorch,pipenv,pipfile,flair,Python,Pytorch,Pipenv,Pipfile,Flair,我在通过pipenv安装python软件包flair和pytorch时遇到问题,尚未解决此问题。由于我正在尝试使用Pipfile+Pipfile.lock而不是requirements.txt来版本我的python git存储库,因此目前不可能: pipenv安装flair 错误:找不到满足torch>=1.1.0要求的版本(来自flair->-r c:\users\user.name\appdata\local\temp\pipenv-plyx3uwp-requirements\pipenv-

我在通过
pipenv
安装python软件包
flair
pytorch
时遇到问题,尚未解决此问题。由于我正在尝试使用
Pipfile+Pipfile.lock
而不是
requirements.txt
来版本我的python git存储库,因此目前不可能:

pipenv安装flair

错误:找不到满足torch>=1.1.0要求的版本(来自flair->-r c:\users\user.name\appdata\local\temp\pipenv-plyx3uwp-requirements\pipenv-xh\u afa\u r-requirement.txt(第1行))(来自版本:0.1.2.post1、0.1.2.post2)错误:未找到torch>=1.1.0的匹配分发(来自flair->-r c:\users\user.name\appdata\local\temp\pipenv-plyx3uwp-requirements\pipenv-xh\u afa\u r-requirement.txt(第1行))安装失败

我尝试了这些安装torchvision的变体:

pipenv安装torchvision

users\user.name\appdata\local\temp\pipenv-hf2be0xq-requirements\pipenv-57akhz4j-requirement.txt (line 1)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) ERROR: No matching distribution found for torch==1.4.0 (from torchvision->-r c:\users\user.name\appdat a\local\temp\pipenv-hf2be0xq-requirements\pipenv-57akhz4j-requirement.txt (line 1)) Installation Failed 要安装torchvision,请选择最新的torch版本

pipenv安装火炬==1.3

安装火炬

pipenv安装https://download.pytorch.org/whl/cu92/torch-0.4.1-cp37-cp37m-win_amd64.whl

安装torch的替代方法(这里有更多的二进制文件:)

pipenv安装git+https://github.com/pytorch/vision#egg=torchvision

users\user.name\appdata\local\temp\pipenv-hf2be0xq-requirements\pipenv-57akhz4j-requirement.txt (line 1)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) ERROR: No matching distribution found for torch==1.4.0 (from torchvision->-r c:\users\user.name\appdat a\local\temp\pipenv-hf2be0xq-requirements\pipenv-57akhz4j-requirement.txt (line 1)) Installation Failed 另一种方式,

Error text: Collecting torchvision Downloading torchvision-0.5.0-cp37-cp37m-win_amd64.whl (1.2 MB) Collecting numpy Using cached numpy-1.18.5-cp37-cp37m-win_amd64.whl (12.7 MB) Collecting pillow>=4.1.1 Downloading Pillow-7.1.2-cp37-cp37m-win_amd64.whl (2.0 MB) Collecting six Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
安装torchvision的唯一方法是不使用其依赖的软件包:

pipenv运行pip安装--无deps torchvision

users\user.name\appdata\local\temp\pipenv-hf2be0xq-requirements\pipenv-57akhz4j-requirement.txt (line 1)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) ERROR: No matching distribution found for torch==1.4.0 (from torchvision->-r c:\users\user.name\appdat a\local\temp\pipenv-hf2be0xq-requirements\pipenv-57akhz4j-requirement.txt (line 1)) Installation Failed
但这并没有解决通过pipenv安装flair的问题,因为需要依赖项。

尝试先清理Pipfile和虚拟环境。它看起来像是可传递依赖项和Pipfile中声明的依赖项冲突

然后尝试按如下方式安装torchvision:

pipenv install torchvision 
这将安装最新的torchvision版本和兼容的torch版本:

:

在这两个操作结束后,您可以在这里找到一个工作的Pipfile和Pipfile.lock文件:

皮普尔

name = "pypi" url = "https://pypi.org/simple" verify_ssl = true [dev-packages] [packages] torchvision = "*" flair = "*" [requires] python_version = "3.6" name=“pypi” url=”https://pypi.org/simple" 验证\u ssl=true [开发包] [套餐] torchvision=“*” flair=“*” [需要] python_version=“3.6”

提供您的Python版本。
torch
Python包在很多Python版本中都不可用。谢谢您的回答。我有以下Python版本:Python 3.7.5 64bit您可以创建一个新环境并运行
pipenv install torch==1.3.1
。输出是什么?相同的错误:
错误:找不到版本满足要求的n torch==1.3.1(来自-r c:\users\user.name\appdata\local\temp\pipenv-fg5mza4n-requirements\pipenv--u 7xxn7ek-requirement.txt(第1行))(来自版本:0.1.2.post1,0.1.2.post2)错误:未找到torch==1.3.1的匹配分布(来自-r c:\users\user.name\appdata\local\temp\pipenv-fg5mza4n-requirements\pipenv--u 7xxn7ek-requirement.txt(第1行))