On Thu, Apr 1, 2021 at 8:36 AM Juan Moraga <juanmoragamar...@gmail.com> wrote:
> ... 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. > I wasn't going to mention this new project I just started, until it was further along, but what you said here lines up with the purpose of the project: https://github.com/justinfx/pygo-plugin It is a port of hashicorp/go-plugin, but with Python as the host implementation. Allows you to write plugins in any language, with enhanced support if they are python (or Go) plugins. It turns the plugin into a gRPC server which is launched and managed as a child process within the host application. So you can do stuff like mixing py2 and py3, or use libraries with conflicting dependencies such as those that were not compiled for the host application. Or you can use plugins written in other languages. The project is still alpha since I only finished the proof-of-concept and working examples. Basic implementation works so far but needs tests, docs, features, ... > A friend of mine used conda to install certain libraries too. > > This was my first 2 cents in this nice forum! I'm pleased to meet you guys > ;) > > On Wed, 31 Mar 2021, 20:05 Todd Widup, <todd.wi...@gmail.com> wrote: > >> thanks all and yea, I was aware of the issue with Numpy..Ive seena few >> ppl release version they have compiled for various version, just nothing >> for 2020 or 2022 yet >> >> On Wed, Mar 31, 2021 at 11:09 AM Marcus Ottosson <konstrukt...@gmail.com> >> wrote: >> >>> You can totally run NumPy in Maya, albeit compiling it is necessary and >>> not easy. :S >>> >>> Here’s someone doing it for 2018. >>> >>> - >>> >>> http://discourse.techart.online/t/numpy-1-13-1-scipy-0-19-1-for-maya-2018/9121 >>> >>> 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. >>> >>> On Wed, 31 Mar 2021 at 15:38, Jakob Kousholt <jako...@gmail.com> wrote: >>> >>>> That's a fair point! I haven't used pip to install NumPy. I used pip to >>>> install a couple of other libraries which I've had no issues with, so I was >>>> unaware of the issues Marcus and Hannes are pointing to. >>>> >>>> On Wed, 31 Mar 2021 at 10:14, Hannes Delbeke <hannesdelb...@gmail.com> >>>> wrote: >>>> >>>>> Adding to Marcus his point >>>>> >>>>> installing from numpy wont work due to compile issues >>>>> however at a previous work place i asked the engineers to compile it >>>>> for the maya specific version and this kept erroring out >>>>> the result: i never managed to get numpy working in maya >>>>> >>>>> so if people online talk about "just use pip", they likely haven't >>>>> tried it themselves. >>>>> >>>>> a way to handle this might be run numpy outside of maya and set up a >>>>> bridge between python in maya and python outside of maya >>>>> >>>>> >>>>> >>>>> On Wednesday, 31 March 2021 at 14:04:15 UTC+1 Marcus Ottosson wrote: >>>>> >>>>>> 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! >>>>>> >>>>>> On Wed, 31 Mar 2021 at 01:45, Jakob Kousholt <jak...@gmail.com> >>>>>> wrote: >>>>>> >>>>>>> Hey Todd, >>>>>>> >>>>>>> >>>>>>> (This will be for maya 2020, and on windows. Let me know if your >>>>>>> system is different) >>>>>>> >>>>>>> So to install pip in in maya you have to download the get-pip.py >>>>>>> script from here: >>>>>>> https://bootstrap.pypa.io/pip/2.7/get-pip.py >>>>>>> >>>>>>> >>>>>>> The easiest way is to place that in your maya bin directory (Usually >>>>>>> located at C:\Program Files\Autodesk\Maya2020\bin). >>>>>>> Then cd into that directory within a terminal and run the following >>>>>>> command: >>>>>>> >>>>>>> mayapy.exe get-pip.py >>>>>>> >>>>>>> After that, you are now able to use pip to install any back you want >>>>>>> using this command: >>>>>>> (from your bin directory) >>>>>>> >>>>>>> mayapy -m pip install <Insert the name of the package you want pip >>>>>>> to install> >>>>>>> >>>>>>> >>>>>>> One thing to note is that you don't have to install pip if you have >>>>>>> maya 2022, as that ships with Python 3, which already contains pip! >>>>>>> >>>>>>> Let me know if I need to clarify anything. Good luck! >>>>>>> >>>>>>> >>>>>>> On Tue, 30 Mar 2021 at 19:32, Todd Widup <todd....@gmail.com> wrote: >>>>>>> >>>>>>>> what is the easiest way of getting them running correctly inside of >>>>>>>> Maya? or even Pip for that matter? >>>>>>>> >>>>>>>> thanks >>>>>>>> -todd >>>>>>>> >>>>>>>> -- >>>>>>>> Todd Widup >>>>>>>> Creature TD / Technical Artist >>>>>>>> todd....@gmail.com >>>>>>>> >>>>>>>> -- >>>>>>>> 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 >>>>>>>> <https://groups.google.com/d/msgid/python_inside_maya/CABBPk35j9gYLByhpBFnho6KXVUhhqO5EKmDuFG1TNSad2U8xgQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>>>> . >>>>>>>> >>>>>>> -- >>>>>>> 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/CAEKd6baABS9nY9jUodRxfe6svWSQR6xWERCOe%3DEWk5ir8CSzMQ%40mail.gmail.com >>>>>>> <https://groups.google.com/d/msgid/python_inside_maya/CAEKd6baABS9nY9jUodRxfe6svWSQR6xWERCOe%3DEWk5ir8CSzMQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>>> . >>>>>>> >>>>>> -- >>>>> 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_maya+unsubscr...@googlegroups.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 >>>>> <https://groups.google.com/d/msgid/python_inside_maya/8ebc1d74-c1b0-4e7e-9566-384175390fd0n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- >>>> 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_maya+unsubscr...@googlegroups.com. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/python_inside_maya/CAEKd6bbQ3y-JO2mRFY4XaEAAJCByooN7OC_07B%2BZV2WhFRNP2A%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/python_inside_maya/CAEKd6bbQ3y-JO2mRFY4XaEAAJCByooN7OC_07B%2BZV2WhFRNP2A%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >>> 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_maya+unsubscr...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBJQouv12SMq%3DYdM7JCQx5AcBMp7vjhTra3w%2BaDRB9mdA%40mail.gmail.com >>> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBJQouv12SMq%3DYdM7JCQx5AcBMp7vjhTra3w%2BaDRB9mdA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> >> >> -- >> Todd Widup >> Creature TD / Technical Artist >> todd.wi...@gmail.com >> >> -- >> 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_maya+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/python_inside_maya/CABBPk35Mv9Q45e9hXOmcHjFRh4QzPPjDyppOi9kSq5JjdfhBwQ%40mail.gmail.com >> <https://groups.google.com/d/msgid/python_inside_maya/CABBPk35Mv9Q45e9hXOmcHjFRh4QzPPjDyppOi9kSq5JjdfhBwQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > 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_maya+unsubscr...@googlegroups.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 > <https://groups.google.com/d/msgid/python_inside_maya/CA%2BKy2f3p%3Da%3DG71Bq2j49FhaWmD7gZ3jOhEDntMd8weEw5QU6KQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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_maya+unsubscr...@googlegroups.com. 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.