Accessing adsk and sub libraries from command line

Accessing adsk and sub libraries from command line

scott.nortman
Enthusiast Enthusiast
637 Views
3 Replies
Message 1 of 4

Accessing adsk and sub libraries from command line

scott.nortman
Enthusiast
Enthusiast

How can I get access to the Fusion adsk libraries when I have a Python terminal open from a command prompt?

 

Ie, when I call

 

>>> import adsk.core
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'adsk'
>>>

 

 

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

jiri.manak
Contributor
Contributor
Accepted solution

are you sure you run the python which comes with the Fusion 360 environment?

 

I am running PyCharm with Fusion 360 plugin. If set up correctly it opens python console where importing adsk is not a problem. 

 

Jiri

0 Likes
Message 3 of 4

scott.nortman
Enthusiast
Enthusiast

Yes, I am running the python.exe from the Fusion 360 install folder.

 

I previously did have other installations of Python that I removed via "add / remove programs" ; perhaps my site-packages is set up wrong?

0 Likes
Message 4 of 4

jiri.manak
Contributor
Contributor

sorry may be stupid questions:

... are sure that you took the last one?

... are aware the installation folder changes at every update/deployment?

 

try this at your python console

>import sys

>sys.executable 

... this shows you which python.exe are you using

 

if you have windows PC (I can't help with Mac)

the adsk are in

your_deployment_folder\\Api\\Python\\packages\\adsk\...

 

python.exe is in 

your_deployment_folder\\Python

 

depolyment folders name is logn alphanumeric string

 

 

0 Likes