Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

No module named 'adsk' problem - Python script for Autodesk Fusion 360

Anonymous

No module named 'adsk' problem - Python script for Autodesk Fusion 360

Anonymous
Not applicable

I want to draw 3D spheres using x,y,z coordinate. Then I am trying to use Python script for Autodesk Fusion 360(CAD).

However, the error has oc 
curred as the image. "No module named 'adsk' problem".

I tried to install the adsk module, but I cant intall.

Then I found that the adsk is in definition folder. So I tried to run the file. But I cant get result.

 

 

I have attached error image and my code.

 

error.PNG

 

0 Likes
Reply
6,451 Views
6 Replies
Replies (6)

hpekristiansen
Advocate
Advocate

- Go to Fusion 360 -> TOOLS -> ADD-INS -> Scripts and Add-Ins... 

- Press Create

- Select script

- Press Edit

- Edit script in VS code

 

- Go to Fusion 360 -> TOOLS -> ADD-INS -> Scripts and Add-Ins... 

- Select script

- Press Run

1 Like

Anonymous
Not applicable

How to enable breakpoints when debugging?

1 Like

Moh_Samy
Participant
Participant

have you managed to know ?

0 Likes

scottmoyse
Mentor
Mentor

This has kept happening to me recently... then I noticed it was because the python interpreter kept changing in my IDE (in my case VS Code). It kept switching to v3.7.6 for some reason. As soon as I switched back to v3.7.3 it was fine.


Scott Moyse
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature


RevOps Strategy Manager at Toolpath. New Zealand based.

Co-founder of the Grumpy Sloth full aluminium billet mechanical keyboard project

1 Like

Moh_Samy
Participant
Participant

Great,
it worked for me as soon as i switched to Python 3.7.6 and added the (adsk.core) path to widows Environment Variables paths.

0 Likes

JeffBradway
Participant
Participant

In case anyone else is still struggling with this, here's some things that I did to get going:

Open VSCode and on the left click the Extensions icon, right click Python and Install Another Version. Then find version 2019.9.24911. Close VSCode. Restart Fusion 360 (if running).

Edit your Windows environmental variable for PATH. (Right click This PC>Properties>Advanced System Settings>Advanced>Environmental Variables.)  Under System Variables find Path and click Edit. Click New and add new lines for your Fusion Python folder and your Python install (if different)

C:\Users\<username>\AppData\Roming\Autodesk\Autodesk Fusion 360\API\Python\defs\

Restart your PC for good measure.

 

Launch Fusion. Open the Tools>Scripts and add-ons. Either create a new script or edit an existing one. VSCode should open.

To Debug: In VSCode click Run>Start Debugging

If you just try to hit the play button in the upper right of the script window then you will get the error. If you start the debugger then it should work.

 

Also, in the lower left of the status bar in VSCode it should say your Python version. Click on it. You will then be able to choose other interpreter versions that are installed on your PC. Pick the version with Autodesk in the path.

 

4 Likes