How to import installed libraries in python (in Mu)?

2.8k views Asked by At

i am new to python and i didn't find a way to import third parties libraries that i installed with pip trought Mu alpha 1 .

i am sure that's because pip install in a different folder then Mu folder but i still can import the standard libraries so i tried to know the place of some standard libraries using module.file but they dont have that attribute . .

i dont know the folder of where mu alpha get his libraries from , so i opened the shell and did

import sys
print(sys.path)

and i get

['', '/lib']

but i have the path to the installed library tho but where to put it ? is there any solution that i can do?

please help (i am using mu bcz i need ESP32)

1

There are 1 answers

2
antont On

Mu has support for installing 3rd party packages now in the GUI, via Admin menu: https://github.com/mu-editor/mu/pull/749

Earlier this kind of pip call worked:

pip install guizero --target "C:\Users\Martin O'Hanlon-LT\AppData\Local\Mu\pkgs"

Maybe you can find your Mu local in User's AppData also.

I didn't know Mu from before but was reading https://github.com/mu-editor/mu/issues/675