Lorenzo Angeli 13 Report post Posted November 13, 2018 Please note, the current development status is in Beta stage and is not suitable for production. Welcome to the ftrack-python-api tech preview for python 3.x compatibility. Here are some brief instructions on how to start testing the upcoming release of the new API. We strongly recommend sandboxing the testing environment using virtualenv.Prepare your sandbox Create a virtualenv with the Python 3 interpreter: $ virtualenv -p `which python3.6` ~/ftrack_python_api_py3k Activate virtualenv: $ source ~/ftrack_python_api_py3k/bin/activate Install Install from the development branch: $ pip install git+https://bitbucket.org/ftrack/ftrack-python-api.git@backlog/ftrack-python-api-compatibility-with-python-3 Test Run python from virtualenv and check that everything is in place: (ftrack_python_api_py3k) $ python -V (ftrack_python_api_py3k) $ Python 3.6.5 You can now start the Python interpreter and start using the API as usual. >>> from ftrack_api import Session >>> session = Session() >>> projects = session.query('Project').all() >>> print(projects) If you need to use the Python3 and the ftrack module just run Python directly from the virtualenv using: $ ~/ftrack_python_api_py3k/bin/python3 -c "import ftrack_api;print(ftrack_api.__version__)" Bug reporting Please use this thread to report issues and bugs. When reporting bugs, please remember to include: * Operating system in use. * Python version in use (use: python -V). * Full stack trace or error. 1 cjarv reacted to this Share this post Link to post Share on other sites
Lorenzo Angeli 13 Report post Posted June 18 Installing and testing the api in Blender Go to the blender's python folder (blender <version>/<version>/python/bin/) Ensure pip is installed with: ./Python3.7m -m ensurepip Install the api using pip: ./pip3 install git+https://bitbucket.org/ftrack/ftrack-python-api.git@backlog/ftrack-python-api-compatibility-with-python-3 as alternative is possible to run the pip module directly from python with: ./python -m pip install git+https://bitbucket.org/ftrack/ftrack-python-api.git@backlog/ftrack-python-api-compatibility-with-python-3 If you want/need to have this included in your requirements.txt you can use the the pip editable syntax as such : (in your requirements.txt) [...] someothermodule >= 0.2 -e git+https://bitbucket.org/ftrack/ftrack-python-api.git@backlog/ftrack-python-api-compatibility-with-python-3#egg=ftrack-python-api [...] Launch Blender and open Python Console to test the api Share this post Link to post Share on other sites
Lorenzo Angeli 13 Report post Posted November 19 We have been restarting the work on the Python api with Python3k support. There's a new branch ( backlog/api-2.0/story ) to use to pick the latest and greatest, and it'll be used until the official release. Here how to update the above snippets to use it: ./pip3 install git+https://bitbucket.org/ftrack/ftrack-python-api.git@backlog/api-2.0/story If you do have any question of you find any issue please let us know. Share this post Link to post Share on other sites
Milan Kolar 33 Report post Posted November 22 Hi. We'll try updating to this latest branch. We've been using the previous one for python 3 for almost a year with only one problem, that we're running into now. It's compatible with either python3 or python 2, but doesn't work in mixed environment. So if we install it with pip3 and then try loading it to maya, it crashes on multilpe wrong imports. We'll investigate more closely and post here. Share this post Link to post Share on other sites
Lorenzo Angeli 13 Report post Posted November 27 HI @Milan Kolar, Thanks for reporting it. I wasn't aware you were already using it ! Be aware that some breaking changes (session won't connect automatically to the event hub) are coming soon on the story branch so be careful. Feel free to get in touch through support to share any stack trace you might be getting. Cheers. L. Share this post Link to post Share on other sites
Milan Kolar 33 Report post Posted November 27 Will do. Yeah we're carefull. pulling a particular commit to make sure it stays ok for us. Share this post Link to post Share on other sites