Forum Discussion
how to install modules
I'm trying to fix a python error in power bi.
No module named 'pandas'
I tried running the following in a command prompt and Python command prmpt but I'm getting errors.
pip install pandas pip install matplotlib
7 Replies
- AnonymousNot applicable
In the second picture, while in Phython environment, just type install pandas (no pip)
- StacyBell2021New Member
I meant to reply here. error
- StacyBell2021New Member
It didn't work.
- AnonymousNot applicable
Hi StacyBell2021 ,
Please try:
1. Please install all the packages that you are mentioning in the python script in Power BI, explicitly in Command Prompt.
Open Command Prompt > for example, type in " py -m pip install pandas" without quotes and then try running the py script in Power BI.
2. This could be because the Python installation directory is not added to the system's PATH environment variable.
You can use the command to add pip to your PATH variable from the command promptsetx.
For example, if your Python version is 3.9, you can type:
setx PATH "%PATH%;C:\Python39\Scripts"3.Open the Anaconda Prompt or Command Prompt as an administrator.
cd C:\Python\ python -m pip install pandas python -m pip install matplotlibBest Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- StacyBell2021New Member
How do I find where python is installed
- AnonymousNot applicable
Hi StacyBell2021 ,
You can find out where Python is installed on your Windows machine by following these steps:
1. Type Python in the Windows Search Bar.
2. Right-click on the Python App, and then select “Open file location” .
3. Right-click again on the Python shortcut, and then select “Properties”.
4. You’ll now get the location/path where your Python is installed on Windows .Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Hi StacyBell2021 ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please feel free to let me know.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.