简体   繁体   English

使用anaconda3安装parmap

[英]Installing parmap using anaconda3

I want to install parmap in anaconda3 for windows 64. If I try conda install -c marufr parmap , I receive an error reporting a conflict between python 2.7 and python 3.6 which is the current python version of my anaconda3. 我想在Windows 64的anaconda3中安装parmap。如果尝试conda install -c marufr parmapconda install -c marufr parmap收到错误消息,报告python 2.7和python 3.6之间的冲突,这是anaconda3的当前python版本。 Is there any way to solve this issue? 有什么办法解决这个问题? This is the error that I am receiving: 这是我收到的错误:

UnsatisfiableError: The following specifications were found to be in conflict: UnsatisfiableError:发现以下规范存在冲突:

-parmap->python 2.7* -parmap-> python 2.7 *

-python 3.6* -python 3.6 *

I've seen this a good deal since using Python 3.6. 自从使用Python 3.6以来,我已经看到很多。 What I have found is that, after receiving this message for a pacakage, quite often using pip to install a package works just fine. 我发现,收到此消息后,通常使用pip安装软件包即可。 As is this case here. 这里就是这种情况。 I just tested on: 我刚刚测试:

Python 3.6.3 :: Anaconda custom (x86_64) Python 3.6.3 :: Anaconda自定义(x86_64)

pip install parmap
Collecting parmap
  Downloading parmap-1.5.1-py2.py3-none-any.whl
Installing collected packages: parmap
Successfully installed parmap-1.5.1

I did notice that the files listed for parmap in marufr are all python 2.7 specific, which is likely causing your problem. 我确实注意到marufr中为parmap列出的文件都是特定于python 2.7的,这很可能导致您的问题。

To be more clear about the error message you are seeing it is in fact a little misleading. 要更清楚地了解错误消息,您实际上会有点误解。 For an example try (on Python 3.6) conda install xlutils . 例如(在Python 3.6上)尝试conda install xlutils You will see a similar message: 您将看到类似的消息:

UnsatisfiableError: The following specifications were found to be in conflict: UnsatisfiableError:发现以下规范存在冲突:

-python 3.6* -python 3.6 *

-xlutils -> python 2.6* -xlutils-> python 2.6 *

That seems to say xlutils is only available for 2.6*. 似乎xlutils仅适用于2.6 *。 But looking further into the problem with conda info xlutils you will see something different. 但是,进一步研究conda info xlutils的问题,您会看到一些不同的东西。 I'm not including the entire readout as it includes all of the versions available, but the last entry is below. 我不包括整个读数,因为它包括所有可用的版本,但是最后一个条目在下面。

xlutils 2.0.0 py35_0
--------------------
file name   : xlutils-2.0.0-py35_0.tar.bz2
name        : xlutils
version     : 2.0.0
build string: py35_0
build number: 0
channel     : defaults
size        : 70 KB
arch        : x86_64
date        : 2016-07-19
license     : MIT
md5         : d73edc0acad935f1835f34a00d6454f0
noarch      : None
platform    : darwin
url         : https://repo.continuum.io/pkgs/free/osx-64/xlutils-2.0.0-py35_0.tar.bz2
dependencies:
    python 3.5*
    xlrd >=0.7.2
    xlwt >=0.7.4

Clearly this package is available for Python 3.5 despite the misleading message from conda install .You could repeat this with the parmap package (after adding the channel to your config with conda config --add channels marufr ), but as I mentioned there is only the one version in that channel so it isn't a great example. 显然,尽管conda conda install产生了误导性消息,但该软件包仍可用于Python 3.5。您可以使用parmap软件包重复此操作(使用conda config --addchannels marufr将通道添加到配置中conda config --add channels marufr ),但是正如我提到的那样,该频道中的一个版本,因此不是一个很好的例子。 To be fair, xlutils doesn't have a Python 3.6 specific version out yet, but the 3.5 version works in 3.6 and can be installed using pip install xlutils . 公平地说,xlutils还没有特定于Python 3.6的版本,但是3.5版本可以在3.6中使用,并且可以使用pip install xlutils进行pip install xlutils

In general I believe the case is just that a handful of packages haven't had the required files added yet. 通常,我认为情况只是少数软件包尚未添加所需的文件。

(parmap author here) (此处为parmap作者)

I recently realized the conda packages where not set to be arch-independent and I was building only linux packages in my channel. 最近,我意识到conda软件包没有设置为独立于Arch的,我只在自己的频道中构建linux软件包。 This is the reason why it was not possible to install parmap with conda install -c zeehio parmap on windows. 这就是为什么它是不可能安装的原因parmapconda install -c zeehio parmap的窗口。

Anyway, I added parmap to conda-forge, so now it is possible to: 无论如何,我已将parmap添加到conda-forge中,因此现在可以:

conda install -c conda-forge parmap

Or 要么

pip install parmap

Whatever option you like best. 无论您最喜欢哪种选择。

parmap works with python2.7 and python3 (as of May 2019, tested on python 3.3 through 3.7) and it works on all platforms supported by multiprocessing (Windows, OSX, Linux included). parmap可与python2.7和python3(截至2019年5月,已在python 3.3至3.7上测试)一起使用,并且可在多处理支持的所有平台上使用(包括Windows,OSX,Linux)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM