2

I have py2.7 as my original Anaconda install, and have installed py3.4 in an environment named py3.

I cannot seem to be able to install blpapi, the Bloomberg API library, in the py3 environment.

Once I activate py3, conda install blpapi cannot find the package, whereas pip install blpapi tells me that:

Requirement already satisfied: blpapi in C:\users\pythonic\programs\anaconda\lib\site-packages

Because it finds the package installed for python 2.7

If I try to install via the executable from here it tells me that it cannot find python 3.4 in the registry.

How do I install this package?

Edit

Apparently the DSM channel does not have the py3.5 version anymore but this channel does

https://anaconda.org/macinv/blpapi/files

Pythonic
  • 2,091
  • 3
  • 21
  • 34

2 Answers2

6

One solution would be creating a Python 3.5 environment:

conda create -n py35 python=3.5

activating it:

activate py35

and installing blpapi form the channel dsm:

conda install -c dsm blpapi 

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

This means blpapi is available for Windows for Python 2.7 and 3.5 but not for 3.4.

To find a package, enter the package name in the Anaconda search window (top of page).

Mike Müller
  • 82,630
  • 20
  • 166
  • 161
  • Thanks Mike. For my understanding, what is the DSM channel and why does it not work for py3.4? Trying the solution as we speak. Edit: works like a charm, thanks – Pythonic Jan 18 '17 at 17:32
  • Updated my answer with more explanation. – Mike Müller Jan 18 '17 at 17:52
  • Saw that thanks, I am trying to figure out how to browse conda channels - dsm did not emerge from a quick "conda channel blpapi" search – Pythonic Jan 18 '17 at 17:58
  • The dsm channel has been updated, currently py36 and py27 are supported. Check https://anaconda.org/dsm/blpapi/files for most current builds – mgilbert Apr 11 '17 at 15:05
  • Yes I think I was commenting in reference to the Linux builds changing, I should have been more explicit. The was related to someone referring to this question with issues https://stackoverflow.com/questions/41725483/anaconda-install-blpapi-in-environment – mgilbert May 30 '17 at 12:37
  • For Python 3.5.4, this worked for me: https://anaconda.org/macinv/blpapi – Ryan J. Shrott Jan 08 '18 at 18:47
4

In addition to Mike Müller's answer above, I thought I would add a section on the anaconda search utility for finding packages hosted on https://anaconda.org/.

$ anaconda search blpapi
Using Anaconda API: https://api.anaconda.org
Packages:
     Name                      |  Version | Package Types   | Platforms       | Builds    
     ------------------------- |   ------ | --------------- | --------------- | ----------
     conda-forge/blpapi        |    3.9.2 | conda           | linux-64, win-64, osx-64 | py27h2d50403_0, py36he980bc4_0, py36h2d50403_0, py27hdc96acc_0
                                      : Python SDK for Bloomberg BLPAPI (<=3.9)
     dsm/blpapi                |    3.9.0 | conda           | linux-64, win-64 | py36_0, py27_0
     josh/blpapi               |    3.5.5 | conda           | linux-64        | py27_0    
     macinv/blpapi             |    3.9.0 | conda           | linux-64, win-64 | py36_0, py27_0, py35_0, py34_0
     mbonix/blpapi             |    3.9.0 | conda           | win-64          | py36_0    
                                      : Bloomberg's Open Market Data Initiative is part of the company's ongoing effort to foster open solutions for the financial services industry.
     p-vg/blpapi               |    3.9.2 | conda           | linux-64, win-64 | py36h6538335_0, py27hc56fc5f_0, py36hf484d3e_0, py27hf484d3e_0
                                      : interface for Bloomberg API services using the Python programming language
Found 6 packages

Depending on the version of python and platform you are interested in, there are a varierty of options available.

mgilbert
  • 3,495
  • 4
  • 22
  • 39