简体   繁体   中英

Python blpapi install

I am trying to install blpapi on python using anaconda.

After all the prerequisites prepared, on my cmd screen, I typed

python setup.py install 

and installed the package.

The last line shows

running install_egg_info
Writing C:\ProgramData\Anaconda2\Lib\site-packages\blpapi-3.5.5-py2.7.egg-info

It seems that it is installed successfully.

After that, on Spyder(Anaconda) I typed in import blpapi , but shows that there is no such module.

What is the next step that I should do?

Just go to the bloomberg api site and download the automatic install package with the right version

It is solved. Seems just installing though cmd is not working properly.

I did 2 things to solve an issue similar to that: In my case, I had the same error no such module . I encountered this problem because I didn't have the required C++ compiler installed. So,

1- I installed Microsoft Visual Studio with the following components

  • C++/CLI Support
  • VC++ 2015.3 v14.00 (v140) toolset for desktop
  • Visual C++ MFC for x86 and x64
  • Visual C++ ATL for x86 and x64

This step may be useful because you may not have C++ compiler, too. You may have Microsoft Visual C++ 14.xx Redistributable or any other version on your computer but it is different from "VC++ 2015.3 v14.00" which comes with Visual Studio.

2- I manually copied the .dll files in C++API\\lib (blpapi3_32.dll and blpapi3_64.dll in my case) into C:\\windows\\system32 where all the dll files that system uses. Also, I copied the dll files in C++API\\lib into C:\\blp\\DAPI, replacing the new ones with the old ones.

Although it doesn't seem too related to your question, I felt the need to write down the second step here because it was the next error I got just after I solved no such module . Keep it in your mind if you get another error after.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM