从pypi包构建conda骨架会引发错误

时间:2016-11-03 00:55:38

标签: python anaconda conda pypi

我正在尝试按照http://conda.pydata.org/docs/build_tutorials/pkgs.html上的教程从pypi创建 conda骨架 pyinstrument

当我调用命令conda skeleton pypi pyinstrument时,它会抛出以下错误:

C:\WINDOWS\system32>conda skeleton pypi pyinstrument
Warning, the following versions were found for pyinstrument
0.10.1
0.11
0.12
0.13
0.13.1
Using 0.13.1
Use --version to specify a different version.
Using url https://pypi.python.org/packages/64/56/d7a0d48973dcf58ea74d5f004e16e9496
Downloading pyinstrument
Using cached download
Unpacking pyinstrument...
done
working in C:\Users\Peter\AppData\Local\Temp\tmpi40k4yslconda_skeleton_pyinstrumen

The following NEW packages will be INSTALLED:

    pip:            8.1.2-py35_0
    python:         3.5.2-0
    pyyaml:         3.12-py35_0
    setuptools:     27.2.0-py35_1
    vs2015_runtime: 14.0.25123-0
    wheel:          0.29.0-py35_0

Applying patch: 'C:\\Users\\Peter\\AppData\\Local\\Temp\\tmpi40k4yslconda_skeleton
        Error:
            Cannot use 'git' (not a git repo and/or patch) and did notfind 'patch' in:  C:\Users\Peter\Anaconda3\conda-bld\skeleton_1478133848196\_b_env\Scripts;..... 
            ...You can install 'patch' using apt-get, yum (Linux), Xcode (MacOSX),
            or conda, m2-patch (Windows),

尝试安装py-stackexchange包时也会抛出此错误,我做错了什么?

1 个答案:

答案 0 :(得分:4)

根据评论建议,请安装patchm2-patch。 在我的情况下,我安装了m2-patch,它解决了我的问题。