"import ftrack_api" in maya
1 1

6 posts in this topic

Hello,

I hope it's the good place for this question..

I need to try some pythons snippets in maya, with ftrack_api.

So, Is it possible to "import ftrack_api" in maya, without launching maya with connect ?

I can import it in a shell/terminal but, not in maya..

thanks in advance,

Share this post


Link to post
Share on other sites

Your PYTHONPATH has to be set accordingly.

Which OS? And how do you start maya? If you start Maya from the same terminal-session from where you can import the api in an interactive python session, you should be able to import the api inside Maya as well.

Edit: Obviously the PYTHONPATH has to be set in the bash-session (or whatever shell you use)
 

Share this post


Link to post
Share on other sites

I'm on Windows 10, maya 2018

Python 2.7.17

ftrack python api installed by "pip install ftrack-python-api"

I start maya with classic maya executable.

I added a var sytem PYTHONPATH =C:\Python27\Lib\site-packages\ftrack_api

In terminal, it's ok but in maya "ImportError: No module named ftrack"

Share this post


Link to post
Share on other sites

Hi @Dimitri Lucy

whenever you are manipulating the PYTHONPATH I suggest extending it rather than overwriting it with something like : PYTHONPATH=%PYTONPATH%:C:\Python27\Lib\site-packages\ftrack_api

On the error you are having though, seems to me that you are installing the new api , but trying to import the legacy ones.
Could you please try to import ftrack_api rather than ftrack ? 

Let us know how it goes ! 
Cheers.
L.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
1 1