首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Conda不会安装pdfpl划手

Conda不会安装pdfpl划手
EN

Stack Overflow用户
提问于 2021-08-05 20:42:44
回答 1查看 2.7K关注 0票数 1

我正在尝试使用miniconda3来安装pdf管道工。我一直收到这个错误信息,我不知道如何解释它。

代码语言:javascript
复制
(env1) C:\Users\engineer>conda install -c conda-forge pdfplumber
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions
Note that strict channel priority may have removed packages required for satisfiability.

另外:

代码语言:javascript
复制
(env1) C:\Users\engineer>conda info

 active environment : env1
active env location : C:\tools\miniconda3\envs\env1
        shell level : 2
   user config file : C:\Users\engineer\.condarc  populated config files : C:\Users\engineer\.condarc
      conda version : 4.10.3
conda-build version : not installed
     python version : 3.8.10.final.0
   virtual packages : __cuda=10.2=0
                      __win=0=0
                      __archspec=1=x86_64
   base environment : C:\tools\miniconda3  (writable)
  conda av data dir : C:\tools\miniconda3\etc\conda   conda av metadata url : None
       channel URLs : https://conda.anaconda.org/conda-forge/win-64
                      https://conda.anaconda.org/conda-forge/noarch
                      https://repo.anaconda.com/pkgs/main/win-64
                      https://repo.anaconda.com/pkgs/main/noarch
                      https://repo.anaconda.com/pkgs/r/win-64
                      https://repo.anaconda.com/pkgs/r/noarch
                      https://repo.anaconda.com/pkgs/msys2/win-64
                      https://repo.anaconda.com/pkgs/msys2/noarch
      package cache : C:\tools\miniconda3\pkgs
                      C:\Users\engineer\.conda\pkgs
                      C:\Users\engineer\AppData\Local\conda\conda\pkgs
   envs directories : C:\tools\miniconda3\envs
                      C:\Users\engineer\.conda\envs
                      C:\Users\engineer\AppData\Local\conda\conda\envs
           platform : win-64
         user-agent : conda/4.10.3 requests/2.26.0 CPython/3.8.10 Windows/10 Windows/10.0.18363
      administrator : False
         netrc file : None
       offline mode : False

使用pip不是一种选择,因为它绝对不会在我的公司代理中起作用,而miniconda3则会。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-08-06 03:57:59

没有win-64的ImageMagick

另一个案例是,Conda在发现无法满足的问题上表现得很糟糕。曼巴在这方面做得很好,指出imagemagick包对于win-64平台是不可用的:

代码语言:javascript
复制
$ CONDA_SUBDIR="win-64" mamba create -dn foo -c conda-forge pdfplumber

                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (0.15.2) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████


Looking for: ['pdfplumber']

bioconda/win-64          [====================] (00m:00s) No change
pkgs/main/noarch         [====================] (00m:00s) Done
pkgs/r/win-64            [====================] (00m:00s) Done
pkgs/r/noarch            [====================] (00m:00s) No change
pkgs/main/win-64         [====================] (00m:00s) Done
bioconda/noarch          [====================] (00m:01s) Done
conda-forge/noarch       [====================] (00m:01s) Done
conda-forge/win-64       [====================] (00m:02s) Done
Encountered problems while solving:
  - nothing provides imagemagick needed by wand-0.5.6-py_0

可能的解决办法

它应该可以在您的系统上本地安装ImageMagick,并确保它可以从命令行访问。然后,您可以使用强制安装的wand包创建一个环境,这是唯一依赖于ImageMagick的包。

下面是创建环境的步骤(下面称为my_env,但要按您的意愿命名):

代码语言:javascript
复制
## create the environment with python (I think you can use 3.6+)
conda create -n my_env python=3.9

## force-install "wand"
conda install -n my_env --no-deps wand=0.6.5

## install pdfplumber
conda install -n my_env pdfplumber

## try using the environment
conda activate my_env

补充说明

不需要ImageMagick。从技术上讲,ImageMagick似乎只用于Pdf管道工的“可视化调试”功能。如果您不需要这样做,那么您可以完全放弃安装ImageMagick。我验证了(在OSX-64上),没有ImageMagick的上述环境可以从pdfplumber文档运行CLI示例和第一个Python示例。

使用隔离环境.,因为强制安装可能很危险(请阅读--no-deps标志上的conda install --help ),我强烈建议为此创建一个专用环境,如上面所示。

为什么要使用wand 版本呢?I为wand指定了一个版本,因为这将有助于防止Conda在更新时试图更改它。

Mamba很棒,I强烈推荐使用。这是一个简单的安装:

代码语言:javascript
复制
conda install -n base -c conda-forge mamba

然后,只要在正常情况下输入mamba ( conda activateconda deactivate命令是例外)就可以使用conda activate

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68673274

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档