I am getting the following error while using python visual. I made use of anaconda distribution for python installation.
Following is the error :
Error Message: Python script error. Traceback (most recent call last): File "PythonScriptWrapper.PY", line 2, in <module> import os, matplotlib.pyplot, uuid, pandas File "C:\Users\jasKsing\AppData\Local\Continuum\anaconda3\lib\site-packages\matplotlib\__init__.py", line 141, in <module> from . import cbook, rcsetup File "C:\Users\jasKsing\AppData\Local\Continuum\anaconda3\lib\site-packages\matplotlib\cbook\__init__.py", line 33, in <module> import numpy as np File "C:\Users\jasKsing\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\__init__.py", line 140, in <module> from . import _distributor_init File "C:\Users\jasKsing\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\_distributor_init.py", line 34, in <module> from . import _mklinit ImportError: DLL load failed: The specified module could not be found.
Following is the script :
# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:
I'm had exactly the same issue and error msg as @Anonymous . So I checked out @ToC 's recipe, but unfortunately it didn't work for me. I figured out that installing anaconda (conda install anaconda) just linked to the existing packages and didn't leave anything for the pip installer to do. But w/o installing anaconda (conda install -n py37 python=3.7) plus the subsequent pip installs all the packages (incl. vs2015_runtime) got newly downloaded and afterwards my Python visual worked like a charm. Thanks for your help, guys!
I chose to intall Anaconda and this resulted in Python version 3.7.3 being installed. I have verified using the command line and Jupyter notebooks that python, numpy, pandas, matplotlib and even seaborn work. I tried upgrading python using conda. I also tried creating a new enviroment version 3.7.1 which is supposedly the supported Python version. That too did not work, I could not navigate to the environment veriable from inside Power BI but I could change to that environment using the command line.
I tried replying earlier but now that I have created an account I can post a screen shot showing my inability to navigate to the Anaconda environment.
I may need to get someone with administrator privlidges or completly blow away Anaconda but I was able to install Anaconda without administrator privlidges.
Of course I tried reinstalling months ago, but I did it again. Seaborn still does not work maybe I should use pip on that but I persisted with some test code as I got a different error after reinstalling numpy. I didn't use any PowerBI integration but I was able to use this code:
from matplotlib import pyplot as plt
import numpy as np
def sinplot(flip = 1):
x = np.linspace(0, 14, 100)
for i in range(1, 5):
plt.plot(x, np.sin(x + i * .5) * (7 - i) * flip)
However I had to have an extra step: copying the environemnt folder from the C:\Program Files to another location, since the Python Script options in Power BI Desktop doesn't allow browsing to the C:\Program Files (probably IT policy).
Do you know how to configure the path in which the new env will be created within conda create?