matthewgilbert / pdblp

pandas wrapper for Bloomberg Open API
MIT License
240 stars 69 forks source link

installation problem Window10 #83

Closed john012343210 closed 4 years ago

john012343210 commented 4 years ago

Installation problem by pip install


ImportError Traceback (most recent call last) ~\Anaconda3\lib\site-packages\blpapi\internals.py in swig_import_helper() 38 try: ---> 39 return importlib.import_module(mname) 40 except ImportError:

~\Anaconda3\lib\importlib__init__.py in import_module(name, package) 126 level += 1 --> 127 return _bootstrap._gcd_import(name[level:], package, level) 128

~\Anaconda3\lib\importlib_bootstrap.py in _gcd_import(name, package, level)

~\Anaconda3\lib\importlib_bootstrap.py in _find_andload(name, import)

~\Anaconda3\lib\importlib_bootstrap.py in _find_and_loadunlocked(name, import)

~\Anaconda3\lib\importlib_bootstrap.py in _load_unlocked(spec)

~\Anaconda3\lib\importlib_bootstrap.py in module_from_spec(spec)

~\Anaconda3\lib\importlib_bootstrap_external.py in create_module(self, spec)

~\Anaconda3\lib\importlib_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)

ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

ModuleNotFoundError Traceback (most recent call last) ~\Anaconda3\lib\site-packages\blpapi__init__.py in 5 try: ----> 6 from .internals import CorrelationId 7 except ImportError as error:

~\Anaconda3\lib\site-packages\blpapi\internals.py in 41 return importlib.import_module('_internals') ---> 42 _internals = swig_import_helper() 43 del swig_import_helper

~\Anaconda3\lib\site-packages\blpapi\internals.py in swig_import_helper() 40 except ImportError: ---> 41 return importlib.import_module('_internals') 42 _internals = swig_import_helper()

~\Anaconda3\lib\importlib__init__.py in import_module(name, package) 126 level += 1 --> 127 return _bootstrap._gcd_import(name[level:], package, level) 128

ModuleNotFoundError: No module named '_internals'

During handling of the above exception, another exception occurred:

ImportError Traceback (most recent call last)

in ----> 1 import pdblp ~\Anaconda3\lib\site-packages\pdblp\__init__.py in ----> 1 from .pdblp import BCon # NOQA 2 from .pdblp import bopen # NOQA 3 from ._version import __version__ # NOQA ~\Anaconda3\lib\site-packages\pdblp\pdblp.py in 2 import contextlib 3 ----> 4 import blpapi 5 import numpy as np 6 import pandas as pd ~\Anaconda3\lib\site-packages\blpapi\__init__.py in 9 # shared object for the C++ library. Provide a meaningful error message. 10 from .debug import debug_load_error ---> 11 raise debug_load_error(error) 12 13 from .abstractsession import AbstractSession ImportError: ---------------------------- ENVIRONMENT ----------------------------- Platform: Windows-10-10.0.18362-SP0 Architecture: ('64bit', 'WindowsPE') Python: 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] Python implementation: CPython blpapi 64-bit will be loaded from: "None" blpapi 32-bit will be loaded from: "None" System PATH: (* marks locations where blpapi was found) "C:\Users\myusername\Anaconda3" "C:\Users\myusername\Anaconda3\Library\mingw-w64\bin" "C:\Users\myusername\Anaconda3\Library\usr\bin" "C:\Users\myusername\Anaconda3\Library\bin" "C:\Users\myusername\Anaconda3\Scripts" "C:\Users\myusername\Anaconda3\bin" "C:\Users\myusername\Anaconda3\condabin" "C:\WINDOWS\system32" "C:\WINDOWS" "C:\WINDOWS\System32\Wbem" "C:\WINDOWS\System32\WindowsPowerShell\v1.0" "C:\WINDOWS\System32\OpenSSH" "C:\Users\myusername\AppData\Local\Microsoft\WindowsApps" "." blpapi package at: "C:\Users\myusername\Anaconda3\lib\site-packages" Current directory: "C:\Users\myusername\Desktop" ---------------------------------------------------------------------- No module named '_versionhelper' Could not open the C++ SDK library. Download and install the latest C++ SDK from: http://www.bloomberg.com/professional/api-library If the C++ SDK is already installed, please ensure that the path to the library was added to PATH before entering the interpreter.
matthewgilbert commented 4 years ago

This is unrelated to pdblp and is a problem with installing blpapi due to improperly set environment variables. I would suggest installing pdblp using conda from the conda-forge channel which will also properly handle blpapi configuration, i.e. conda install -c conda-forge pdblp