I've created a chart using python and pipenv. I want to integrate this chart into my company's main PowerBI
environment. I've read that I can use python scripts within PowerBI Desktop
, as long as I provide a path to a local python installation.
From what I understand, I can control my local installation, therefore I'm free to use my preferred environment:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
scikit-learn = "*"
pandas = "*"
ipykernel = "*"
matplotlib = "*"
seaborn = "*"
plotly = "*"
nbformat = "*"
ipywidgets = "*"
[dev-packages]
[requires]
python_version = "3.10"
python_full_version = "3.10.11"
However, I don't know how to set up a pipenv environment in the company's environment. I've gone through this answer to a similar question, but it does not mention how to set up custom environments or whether it is possible or not.
How, if possible, can I customize the python environment I will use within PowerBI
(NOT PowerBI Desktop
)?
You can't customise the PBI Service Python items. There are some limits to Python in PBI, and in the service.
You'll need for the script part in Power Query, a VM/PC with a personal gateway installed, and the relevent python versions and libraries too. Once you deploy the report to the service you have to link it to that gateway so it can run refresh the data. In the visual you can reference some libraries, but don't do data transformation there to get the data into place for the visual.