0

i am trying to connect my pycharm to my Bloomberg terminal. At my old company the infrastrcutre was already setup but not at this smaller company. I am using the link provided by bloomberg (https://www.bloomberg.com/professional/support/api-library/) but because of the security setup on my work pc I cannot pip install this (>> python -m pip install --index-url=https://bcms.bloomberg.com/pip/simple blpapi). Does anyone know how to

  1. connect to bloomberg using baby steps
  2. manually download these packages instead of pip install
  3. where to save these packages to import them into the code

Thanks

Zack
  • 339
  • 2
  • 12
  • If the Bloomi API is necessary for your work, then get an admin to install it? Are you set up to install packages for all users (in which case you need admin rights) or just under your profile? – DS_London Aug 20 '21 at 08:24

2 Answers2

0

Are you allowed to use virtualenv?

If you are you can just do:

   virtualenv env
   source env/bin/activate
   pip install --index-url=https://bcms.bloomberg.com/pip/simple blpapi

That will then install it only to your local virtual environment.

If you're not, you also just open https://bcms.bloomberg.com/pip/simple/blpapi/ and download the libraries yourself, uncompress them, and put the files on the PYTHONPATH of your application.

hangonstack
  • 162
  • 5
  • thanks - silly question but regarding that link -> which one do i download if you know? – Zack Aug 19 '21 at 20:06
  • If you know your platform and OS, then pick the one that matches. Otherwise `tar.gz` file should contain all the necessary source files. I just downloaded it and uncompressed it. It has a setup.py that will install the package for you. But my guess is that your security policy may not allow it. You could try just using the Python files without installation but I noticed there's two `.c` files so that may not work. At this point virtualenv might be your best bet. For how to use `setup.py` read https://www.activestate.com/resources/quick-reads/how-to-manually-install-python-packages/ – hangonstack Aug 19 '21 at 20:17
0

I was interested in the question so thought I'd share what I found poking around.

Edit: Grab the wheel file from the site https://bcms.bloomberg.com/pip/simple/blpapi/ and try these ideas with help from this question: Install python wheel file without using pip

(Edit: the link was down when I looked, now it is up so grab the right one for your platform.)

Pycharm has a lot of tools to install things in a virtual env, if they block that at work, but let you install pycharm and python then things are a little messed up. Just sayin...

If you get into pycharm settings and go to project interpreter and then click add you can search bloomberg and there are 3 projects. You might see if those have any support. They do have email addresses you can contact the people. Those might be old and no good anymore or they might be better, who knows.

Hopefully these ideas give you a new lead somewhere.

Brian Z
  • 343
  • 1
  • 8