Do Houdini with Python3! !! !!

Introduction

This is the second ad-care article this year. The first was "Verify the new installation method of SideFX Labs Tool and the Package function". So, this time, I'd like to use another angle.

It is a Python story.

For various reasons, my business base has already moved to the Python3 series, and I regularly use the Python3 series. 3 series when making a stand-alone tool. Even when you have to write Python processing due to M ○ y ○ etc., the base is to write a pipeline in Python3, and the processing to rotate M ○ y ○ processing in Python2 is rotated in another process. Rather, the psychological situation due to the limitation that "Python 2 must be used for DCC tools even though various other automatic processes are supposed to be written in 3 system" and the barrenness of dealing with it. I feel stressed by.

Following the article on the VFX Reference Platform (https://vfxplatform.com), it was previously suggested that we would move to Python 3 as of 2019. However, it seems that it was difficult to deal with it, and it is now 2020. (Although it seems that the Python3 version has not been released yet in M ○ y ○ 2020 ...?: Thinking :) I've heard rumors of enthusiasm that it won't be out of date anymore, and despite the question "Is it true?", The preview version of Python 3 has begun to be distributed at this "** Houdini 18": bangbang: "**" means that an event that divides one history has finally begun to occur.

Well, that's why the long-awaited preview version for Python 3 has opened, so let's try to hit it, aside from the fact that the bugs are big.

By the way, the processing itself in Python3 is possible at the time of PDG of 17.5, and regarding the method of inserting the processing of Python3 in the flow, ** I have already described the method here ** Please refer to it!

:warning: ** By the way, I would like to decline, but this version is just a preview version, and I'm just playing de M to go to the bugs, so be prepared to jump in when you imitate ** : wink: :warning:

Let's go: bangbang:

Preview environment

Houdini 18.0.310 Windows 10

Installation

First, go to download the installer.

First, go to Get> Download and vivaldi_bYcUKlO5eL.png

Go to those pages in the Production Build or Daily Build downloads. whichever. image.png

By default, the specified filter is applied, so switch the filter with Houdini Python 3 in the filter menu.

image.png

And download: bangbang:

And install: bangbang :: bangbang: Oh: bangbang :: bangbang :: bangbang :: bangbang: image.png

Try out

Well, it would have been nice to have an article that wouldn't end with just downloading and installing, but I'm curious about the actual behavior, so I'll give it a try.

Start-up

After the startup started, I immediately felt a disturbing atmosphere in the error that appeared on the console display, and the startup was completed. image.png

Apparently, this area doesn't support Python 3 yet.

Python Shell

For the time being, let's launch Python Shell. The latest version of the current 3.7 series, Python 3.7.4, is adopted.

image.png

Window Title

Python 3 is also written in the Window title, so you can recognize which variant you are currently using.

image.png

The first bug that node edit events are not supported

Apparently, the event when rewriting the node name in Houdini is also using Python, and even changing the node name is not allowed. I am getting a Unicode error.

Would you like to change the name of the node ... Hot: exclamation :: muscle :: muscle :: muscle:

houdini_pcUl0wQ9mF.png

Test if the module that is battery included in Python 3 system passes

Try it with Pathlib. image.png

I got it! Personally, this is just usable and worth the evaluation: angel:

Houdini Python 3 with TensorFlow on Windows

The Windows version of TensorFlow was developed with no intention of supporting Python 2, so it was an option to either go out of support or dare to use Linux. However, once Houdini supports Python 3, it doesn't matter anymore, so you can use TensorFlow with open support: bangbang: So I tried to see if I could go.

Only the result for the time being.

** Hmm, don't (.´ ・ ω ・) ** image.png

By the way, when I hit it a second time, I get another import error.

>>> import tensorflow as tf
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow\__init__.py", line 98, in <module>
    from tensorflow_core import *
  File "D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow_core\__init__.py", line 45, in <module>
    from . _api.v2 import compat
  File "D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow_core\_api\v2\compat\__init__.py", line 23, in <module>
    from . import v1
  File "D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow_core\_api\v2\compat\v1\__init__.py", line 40, in <module>
    from . import experimental
  File "D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow_core\_api\v2\compat\v1\experimental\__init__.py", line 11, in <module>
    from tensorflow.python.ops.control_flow_v2_toggles import output_all_intermediates
  File "D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow_core\python\ops\control_flow_v2_toggles.py", line 24, in <module>
    from tensorflow.python.ops import control_flow_util_v2
  File "D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow_core\python\ops\control_flow_util_v2.py", line 28, in <module>
    from tensorflow.python.keras.engine import base_layer_utils
  File "D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow_core\python\keras\__init__.py", line 27, in <module>
    from tensorflow.python.keras import applications
  File "D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow_core\python\keras\applications\__init__.py", line 25, in <module>
    from tensorflow.python.keras import engine
  File "D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow_core\python\keras\engine\__init__.py", line 23, in <module>
    from tensorflow.python.keras.engine.base_layer import Layer
  File "D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow_core\python\keras\engine\base_layer.py", line 56, in <module>
    from tensorflow.python.keras.saving.saved_model import layer_serialization
  File "D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow_core\python\keras\saving\__init__.py", line 20, in <module>
    from tensorflow.python.keras.saving.hdf5_format import load_attributes_from_hdf5_group
  File "D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow_core\python\keras\saving\hdf5_format.py", line 32, in <module>
    from tensorflow.python.keras.utils import conv_utils
  File "D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow_core\python\keras\utils\__init__.py", line 38, in <module>
    from tensorflow.python.keras.utils.multi_gpu_utils import multi_gpu_model
  File "D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow_core\python\keras\utils\multi_gpu_utils.py", line 22, in <module>
    from tensorflow.python.keras.engine.training import Model
  File "D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow_core\python\keras\engine\training.py", line 42, in <module>
    from tensorflow.python.keras import metrics as metrics_module
  File "D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow_core\python\keras\metrics.py", line 34, in <module>
    from tensorflow.python.keras.engine.base_layer import Layer
ImportError: cannot import name 'Layer' from 'tensorflow.python.keras.engine.base_layer' (D:\Develop\Houdini\Qiita\tf2\python3.7.4\site-packages\tensorflow_core\python\keras\engine\base_layer.py)

Verification method A

For the time being, how to cut out and test at the time of pip install.

  1. Create a Python 3.7.4 environment with Anaconda and enter that environment.
  2. At the command line, install with pip install -t <verification path> tensorflow = 2.0.0.
  3. On the command line, set with set PYTHONPATH = <verification path>.
  4. For the time being, test whether it works properly on the command line. image.png
  5. At the command line, run Houdini with call" C: \ Program Files \ Side Effects Software \ Houdini 18.0.310 \ bin \ happrentice.exe " or write to houdini.env.
  6. Try running ʻimport tensorflow as tf; tf .__ version __`.

result

Above error

Verification method B

How to leave it to Anaconda's conda install obediently.

  1. Create a Python 3.7.4 environment with Anaconda and enter that environment.
  2. At the command line, install with conda install tensorflow = 2.0.0.
  3. For the time being, test whether it works properly on the command line.
  4. At the command line, run Houdini with call" C: \ Program Files \ Side Effects Software \ Houdini 18.0.310 \ bin \ happrentice.exe " or write to houdini.env.
  5. Try running ʻimport tensorflow as tf; tf .__ version __`.

result

Also the above error

Verification method C

In the first place, how to test if Python that comes with Houdini installation is okay.

  1. Follow step 3 of verification method A.
  2. At the command line, try "C: \ Program Files \ Side Effects Software \ Houdini 18.0.310 \ python37 \ python.exe" to start Python, which comes with Houdini's installation.
  3. Try running ʻimport tensorflow as tf; tf .__ version __`. -> This guy is working properly

Verification method D

In the first place, try the new Daily Build.

Verification environment Houdini 18.0.315

  1. Download a new build.
  2. Test according to the procedure of verification A.

result

It was the same ... (.´ ・ ω ・)

Hmm ... (.´ ・ ω ・) Apparently, another module that comes with Houdini Python 3 is bad. I think the hou module itself doesn't support Python3 yet. I lost the energy to chase any more ... Well, I'll try again after a while. The light of curiosity is again: volcano:

Summary

………, I was able to confirm that Python3 works (I didn't lie) for the time being. However, it seems that the development people are having a lot of trouble, perhaps because it is still a thorny road. It may be better to keep an eye on it for a while and carry out further verification.

Recommended Posts

Do Houdini with Python3! !! !!
Do Django with CodeStar (Python3.6.8, Django2.2.9)
Do Django with CodeStar (Python3.8, Django2.1.15)
To do tail recursion with Python2
What to do with PYTHON release?
Let's do image scraping with Python
Python | What you can do with Python
FizzBuzz with Python3
Scraping with Python
Statistics with python
Scraping with Python
Python with Go
Twilio with Python
Play with 2016-Python
Tested with Python
with syntax (Python)
Bingo with python
Zundokokiyoshi with python
Excel with Python
Microcomputer with Python
Cast with python
Let Heroku do background processing with Python
How to do portmanteau test with python
Let's do MySQL data manipulation with Python
Serial communication with Python
Zip, unzip with python
Django 1.11 started with Python3.6
Primality test with Python
Python with eclipse + PyDev.
Socket communication with Python
Data analysis with python 2
Scraping with Python (preparation)
Try scraping with Python.
Learning Python with ChemTHEATER 03
Sequential search with Python
"Object-oriented" learning with python
Run Python with VBA
Handling yaml with python
Solve AtCoder 167 with python
Serial communication with python
[Python] Use JSON with Python
How to do multi-core parallel processing with python
Learning Python with ChemTHEATER 05-1
Learn Python with ChemTHEATER
1.1 Getting Started with Python
Binarization with OpenCV / Python
3. 3. AI programming with Python
Kernel Method with Python
Non-blocking with Python + uWSGI
Scraping with Python + PhantomJS
Posting tweets with python
Drive WebDriver with python
Use mecab with Python3
Voice analysis with python
Think yaml with python
Operate Kinesis with Python
Getting Started with Python
Use DynamoDB with Python
Zundko getter with python
Handle Excel with python
Ohm's Law with Python