Python conda - 如何升级anaconda上不可用的包

时间:2015-12-09 08:43:24

标签: python-2.7 anaconda jupyter jupyter-notebook

如果我查看Anaconda软件包(http://docs.continuum.io/anaconda/pkg-docs),则版本 4.0.0 中有一个名为“nbconvert”的软件包。 在nbconvert(https://github.com/jupyter/nbconvert/releases)的github网站上有一个较新的版本(我需要这个版本) 4.1.0 。现在如何在我的机器上安装这个版本?如果我试着

var BASE64_MARKER = ';base64,';

function convertDataURIToBinary(dataURI) {
    var base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length;
    var base64 = dataURI.substring(base64Index);
    var raw = window.atob(base64);
    var rawLength = raw.length;
    var array = new Uint8Array(new ArrayBuffer(rawLength));

    for(i = 0; i < rawLength; i++) {
        array[i] = raw.charCodeAt(i);
    }
    return array;
}

var pdfAsDataUri = "data:application/pdf;base64," + base64encodedString;
var pdfAsArray = convertDataURIToBinary(pdfAsDataUri);
PDFJS.getDocument(pdfAsArray)

base64encodedString = JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9MZW5ndGggMTE1My9GaWx0ZXIvRmxhdGVEZWNvZGU+PnN0cmVhbQp4nI2XbW/bNhDH3/tT8NXQAavCJ1HigAF17SRI29hNrHR7y1lsp8CWXYne5m+/k2R5NcVTgiKok//97o6n4+n8ffI+mwhFkiQhWT6h5C1n/adEnT4w2n+Scf8nJZtP19nkYfK9/eHkAwi3ExrF5J9JmkaCJIoSRmWkCPis7GR1EpnmkW5VwUSUemqHSjGGgoqjXI2hoOIo1WMoqCiqNB9BGxVHk3gMBRVH43QMBRVHJRtDQcVRLsdQUHGUJmMoqCga67FuatRL9KFpbUYo/GNE07YfoX23k6ub5uQk+zp588WW+a4iC7O1v/6cPTf9/APEtGz71KemZE5WT1m2XJCfyGq5WA3RLp5Mw/Fmu9KZtcNDDsAPtiyP5JPZYqEEC4e63ppigwcaYM9NoHf1YW8rV4GLonSbaL1D4zIZjjvN88rWNR55AHJKfr9eZUSIRyhv9nh9nSFBlU489gaquauO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KMDAwMDAwMTIzNiAwMDAwMCBuIAowMDAwMDAxNjQyIDAwMDAwIG4gCjAwMDAwMDE2ODcgMDAwMDAgbiAKdHJhaWxlcgo8PC9Sb290IDYgMCBSL0lEIFs8Y2RmYjYwYjE2YjY0YTM5MGZiNGQ1ZTI1ZGU4ZmNkMTg+PGQ2OWY0NzdkZTUxZGQ0YjVhMzZkZGEwZjJmMDMzZGJiPl0vSW5mbyA3IDAgUi9TaXplIDg+PgpzdGFydHhyZWYKMTg5OAolJUVPRgo=

它将安装4.0.0版。但我需要这个新的

如果我尝试使用

搜索此包
conda install nbconvert

它只找到4.0.0版本

1 个答案:

答案 0 :(得分:3)

最简单的方法是使用最新版本的pip临时替换conda的nbconvert

以下是你如何做到这一点:

conda remove nbconvert
pip install nbconvert

之后,您可以输入nbconvert来查看jupyter nbconvert --version的版本。如果一切顺利,您会看到4.1.0

请注意,这只是一个临时解决方法,直到连续统一分析的开发人员更新程序包。当切换回pip uninstall版本时,不要忘记conda installconda