問題描述
我將 py2.7 作為我最初的 Anaconda 安裝,并在名為 py3
的環境中安裝了 py3.4.
I have py2.7 as my original Anaconda install, and have installed py3.4 in an environment named py3
.
我似乎無法在 py3
環境中安裝 blpapi
,Bloomberg API 庫.
I cannot seem to be able to install blpapi
, the Bloomberg API library, in the py3
environment.
一旦我 activate py3
,conda install blpapi
找不到包,而 pip install blpapi
告訴我:
Once I activate py3
, conda install blpapi
cannot find the package, whereas pip install blpapi
tells me that:
Requirement already satisfied: blpapi in C:userspythonicprogramsanacondalibsite-packages
因為它找到了為 python 2.7 安裝的包
Because it finds the package installed for python 2.7
如果我嘗試通過 here 的可執行文件進行安裝,它會告訴我它不能在注冊表中找到 python 3.4.
If I try to install via the executable from here it tells me that it cannot find python 3.4 in the registry.
如何安裝這個包?
編輯
顯然 DSM 頻道沒有 py3.5 版本,但這個頻道有
Apparently the DSM channel does not have the py3.5 version anymore but this channel does
https://anaconda.org/macinv/blpapi/files
推薦答案
一個解決方案是創建一個 Python 3.5 環境:
One solution would be creating a Python 3.5 environment:
conda create -n py35 python=3.5
激活它:
activate py35
并從頻道 dsm
安裝 blpapi
:
conda install -c dsm blpapi
頻道 dsm 是一個 Anaconda 頻道.它提供了這些 文件:
The channel dsm is an Anaconda channel. It provides these files:
win-64/blpapi-3.9.0-py35_0.tar.bz2
win-64/blpapi-3.5.5-py27_0.tar.bz2
linux-64/blpapi-3.5.5-py27_0.tar.bz2
這意味著 blpapi
適用于 Windows 的 Python 2.7 和 3.5,但不適用于 3.4.
This means blpapi
is available for Windows for Python 2.7 and 3.5 but not for 3.4.
要查找包,請在 Anaconda 搜索窗口(頁面頂部)中輸入包名稱.
To find a package, enter the package name in the Anaconda search window (top of page).
這篇關于Anaconda - 在環境中安裝 blpapi的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!