Recommended way of installing python packages

Recommended way of installing python packages

andreasbaldur
Observer Observer
984 Views
0 Replies
Message 1 of 1

Recommended way of installing python packages

andreasbaldur
Observer
Observer

Hi

 

I have tried to search the forum for a recommended way / best practices when it comes to installing python packages for Fusion 360 scripts. I find a lot of different ways to deal with this problem, none of which I find very elegant. Let's say I need numpy or some similar package for my script. How would you install that dependency?

 

Here is the best suggestion I have been able to find: (https://forums.autodesk.com/t5/fusion-360-api-and-scripts/to-install-python-modules/m-p/5777176)

Create a shared library location and do an absolute import after modifying the sys.path list to include your shared library folder.  I would put this shared library folder out in the user API folder so it survives across updates (or any location convenient to you, but using a location relative to your scripts would make it more portable if you ever shared your scripts).

 

Is that really the best way to do it?

 

Best regards,

abaldur

985 Views
0 Replies
Replies (0)