After Fusion 360 background update, I need to reinstall numpy . . . . . . .

After Fusion 360 background update, I need to reinstall numpy . . . . . . .

jackie.lin.945
Participant Participant
816 Views
3 Replies
Message 1 of 4

After Fusion 360 background update, I need to reinstall numpy . . . . . . .

jackie.lin.945
Participant
Participant

for my windows directory
C:\Users\myName\AppData\Local\Autodesk\webdeploy\production\

there are some subdirectory.

ex : one is 65899d0f0113f775e86f30ece2eeaf89fc855cb7

After Fusion 360 Background auto update, it seems Fusion will add a new subdirectory.

There is only one dir has many system files.
After update, I need to reinstall numpy module to run my script correctly.
Sometime I did no noticed that Fusion has silently update.
I run my script, Fusion not showing error, but no result that is I expect.
I check every where and then I reinstall numpy, it became normal.
How do I know Fusion is updated and I need to reinstall numpy???????
Thank you.

0 Likes
Accepted solutions (1)
817 Views
3 Replies
Replies (3)
Message 2 of 4

tykapl.breuil
Advocate
Advocate

I gather you install numpy in your fusion installation by adding it to the path in the .env. As you've noticed, this solution causes problems when fusion is updated as the version hash number changes. If you want to have non standard library imports, i'll advise using a folder directly in your add-in/script directory and adding that path to sys.path with sys.path.insert.

Message 3 of 4

JeromeBriot
Mentor
Mentor
Accepted solution

@jackie.lin.945  a écrit :

How do I know Fusion is updated and I need to reinstall numpy???????

Hello,

 

I quickly wrote an add-in that displays a dialog at startup if Fusion 360 has been updated: New version info

 

But you should also consider the advice given by @tykapl.breuil 

 

 

Message 4 of 4

MichaelT_123
Advisor
Advisor

Hi Fellows,

I have adopted a slightly different strategy. It is as follows:

  • Install an independent version of Python
  • and the same version as in F360
  • load it with all python modules you like
  • create environmental variable referring to the ...\Python??\Lib\site-packages
  • in F360 script, using this variable attach this path 
  • sys.path.append( packagesPath) 
  • use imports as normal 

In my case it works, ... but I will not give warranty 😏.

 

Regards

MichaelT

 

 

MichaelT