Jump to content

"import ftrack_api" in maya


Dimitri Lucy

Recommended Posts

Posted

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,

Posted

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)
 

Posted

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"

Posted

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...