Forum Discussion
Import CSV-file on AWS S3 from Power BI with Python script: Importing the numpy C-extensions failed
- Anonymous4 years ago
I did extensive research in the past few days and figured it out:
- Anaconda is not a good option to use in combination with Power BI because you need to be able to open Power Bi from the command prompt (which I can't), see this acticle
- Instead of using Anaconda I installed Python 3.8.7 locally (64-bit version) and installed the required packages
- To avoid any conflicts between Python versions I deleted all other local Python installations (I did not delete Anaconda's Python versions)
- Then I opened Power BI from the start menu, cleared the cache in Power BI options & settings - Data Load (see image) and then closed Power BI again.
- Then I opened Power BI again from the start menu and ran my Python script... it worked!
Hi Anonymous
As the error code:
py:143: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
and then check if you have set it up.
https://docs.microsoft.com/en-us/power-bi/desktop-python-ide
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous4 years agoNot applicable
Hi Anonymous , thanks for your suggestions.
I am using Anaconda and have mkl-service installed, see:
# Name Version Build Channel asn1crypto 1.4.0 pyh9f0ad1d_0 conda-forge awscli 1.20.54 py36ha15d459_0 conda-forge blas 1.0 mkl anaconda boto3 1.18.21 pyhd3eb1b0_0 botocore 1.21.54 pyhd8ed1ab_0 conda-forge brotlipy 0.7.0 py36h68aa20f_1001 conda-forge ca-certificates 2021.9.30 haa95532_1 certifi 2021.5.30 py36haa95532_0 cffi 1.14.6 py36he58ceb7_1 conda-forge colorama 0.4.3 py_0 conda-forge cryptography 2.5 py36h74b6da3_1 conda-forge cycler 0.10.0 py36h009560c_0 anaconda docutils 0.15.2 py36ha15d459_2 conda-forge freetype 2.10.4 hd328e21_0 anaconda icc_rt 2019.0.0 h0cc432a_1 icu 58.2 vc14hc45fdbb_0 [vc14] anaconda idna 3.1 pyhd3deb0d_0 conda-forge intel-openmp 2020.2 254 anaconda jmespath 0.10.0 pyh9f0ad1d_0 conda-forge jpeg 9b vc14h4d7706e_1 [vc14] anaconda kiwisolver 1.2.0 py36h74a9793_0 anaconda libpng 1.6.37 h2a8f88b_0 anaconda matplotlib 3.2.1 0 anaconda matplotlib-base 3.2.1 py36h64f37c6_0 anaconda mkl 2019.4 245 anaconda mkl-service 2.3.0 py36hb782905_0 anaconda mkl_fft 1.2.0 py36h45dec08_0 anaconda mkl_random 1.1.0 py36h675688f_0 anaconda numpy 1.18.1 py36h93ca92e_0 numpy-base 1.18.1 py36hc3f5095_1 openssl 1.0.2u he774522_0 pandas 1.0.1 py36h47e9c7a_0 anaconda pip 21.0.1 py36haa95532_0 powershell_shortcut 0.0.1 3 pyasn1 0.4.8 py_0 conda-forge pycparser 2.20 pyh9f0ad1d_2 conda-forge pyopenssl 19.0.0 py36_0 conda-forge pyparsing 2.4.7 py_0 anaconda pyqt 5.9.2 py36ha878b3d_0 anaconda pysocks 1.7.1 py36ha15d459_3 conda-forge python 3.6.13 h3758d61_0 python-dateutil 2.8.1 py_0 anaconda python_abi 3.6 2_cp36m conda-forge pytz 2020.1 py_0 anaconda pyyaml 5.4.1 py36h68aa20f_1 conda-forge qt 5.9.6 vc14h1e9a669_2 [vc14] anaconda rsa 4.7.2 pyh44b312d_0 conda-forge s3transfer 0.5.0 pyhd8ed1ab_0 conda-forge setuptools 58.0.4 py36haa95532_0 sip 4.19.24 py36ha925a31_0 anaconda six 1.15.0 py_0 anaconda sqlite 3.36.0 h2bbff1b_0 tornado 6.0.4 py36he774522_1 anaconda urllib3 1.26.7 pyhd8ed1ab_0 conda-forge vc 14.2 h21ff451_1 vs2015_runtime 14.27.29016 h5e58377_2 wheel 0.37.0 pyhd3eb1b0_1 win_inet_pton 1.1.0 py36ha15d459_2 conda-forge wincertstore 0.2 py36h7fe50ca_0 yaml 0.2.5 he774522_0 conda-forge zlib 1.2.11 vc14h1cdd9ab_1 [vc14] anacondaI also have the Python home directory (C:\Users\MyName\anaconda3\envs\PowerBI) and Desktop Python IDE (I tried both "Default OS program for .PY files" and C:\Users\MyName\AppData\Local\Programs\Microsoft VS Code\Code.exe) set up, see:
... but I still get the same error. Do you have any other suggestions?