--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABBPk35j9gYLByhpBFnho6KXVUhhqO5EKmDuFG1TNSad2U8xgQ%40mail.gmail.com.
Remember that anything installed via pip that was compiled, like numpy, was compiled for a specific version of Python; and it wasn’t the version of Python in Maya. Not even for Maya 2022.
Instead, you’d get the version coming off of PyPI, which is where pip gets its packages. Those have all been built for the vanilla Python off of python.org. So you should expect those libraries to either refuse to load outright (if you’re lucky), or to load and believe it got loaded into vanilla Python when really it’s Maya’s custom build. The result is either crashes, memory faults or worse; silent errors. Random errors that occur from bad memory being accessed but not always invalid. The kind that are next to impossible to debug.
If you do want numpy and other compiled things in Maya without worrying about that, if compile it for Maya (mayapy). There are semi-exceptions though; I used to use PyQt4 off of PyPI for Maya 2014-2015 for years without issue. Odds are the parts of Python used by that compiled library was identical across mayapy and python.org. But there’s no way (?) to know up-front!
For anything that isn’t compiled however - like six
or black
- this isn’t an issue and all of PyPI is at Maya’s disposal.
If you’d rather not take my word for it, Google about it or search this mailing list; it’s a topic that’s been rehashed a number of times over the years.
Stay safe!
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAEKd6baABS9nY9jUodRxfe6svWSQR6xWERCOe%3DEWk5ir8CSzMQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/8ebc1d74-c1b0-4e7e-9566-384175390fd0n%40googlegroups.com.
You can totally run NumPy in Maya, albeit compiling it is necessary and not easy. :S
Here’s someone doing it for 2018.
I doubt there’s anything you could build for Python that didn’t also build for Maya. As I understand it, the differences in Maya’s Python are additions to the source rather than removals. So if anything you’d be able to compile things with mayapy that you couldn’t compile with vanilla Python.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAEKd6bbQ3y-JO2mRFY4XaEAAJCByooN7OC_07B%2BZV2WhFRNP2A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBJQouv12SMq%3DYdM7JCQx5AcBMp7vjhTra3w%2BaDRB9mdA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABBPk35Mv9Q45e9hXOmcHjFRh4QzPPjDyppOi9kSq5JjdfhBwQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CA%2BKy2f3p%3Da%3DG71Bq2j49FhaWmD7gZ3jOhEDntMd8weEw5QU6KQ%40mail.gmail.com.
... Also running py3 in a subprocess inside maya and capturing the output can do the work too, or having a server in python 3 that listens to a client in maya. but all these are more convoluted.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CA%2BKy2f3p%3Da%3DG71Bq2j49FhaWmD7gZ3jOhEDntMd8weEw5QU6KQ%40mail.gmail.com.
Allows you to write plugins in any language
I tried grokking that README and the README of the parent project, but can’t figure out what “plugin” means in this context? :S I think you need an example or usecase. Do you mean a C-extension? Or a Python module? Or some plug-in to the Python intepreter, like additional syntax? Getting off-topic, sorry haha. But if you mean a method of communicating between processes, then “plugin” doesn’t seem the right choice of word. That’s just an IPC library.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0HDwg%3D1Xq5OV1vMTuRh3WnqWC_5fXfG%2Bp_Nqz8nfFv_w%40mail.gmail.com.
Allows you to write plugins in any language
I tried grokking that README and the README of the parent project, but can’t figure out what “plugin” means in this context? :S I think you need an example or usecase. Do you mean a C-extension? Or a Python module? Or some plug-in to the Python intepreter, like additional syntax? Getting off-topic, sorry haha. But if you mean a method of communicating between processes, then “plugin” doesn’t seem the right choice of word. That’s just an IPC library.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODaWtKwuCOY1TsqRup9%2BjOkq6ZGBviQEYj30NLz08eJKg%40mail.gmail.com.