GhPython adding external module: Question

Thank you ; how i can load compas in ghpython? because it didn’t work for me
or i need copy the files to ironpython folder?

Sorry I can’t help here, you’ll have to look into the COMPAS documentation for installation instructions. They also have a support forum I believe.

1 Like

Thanks i install it :slightly_smiling_face:
i just need to know how i can use pymaxwell with compas ; in the website there are many examples but about meshes

I test Compas but it’s very slow , i prefer GHPythonRemote
Ok no need to use conda or virtual environment
I install it again with python 2.7 which only need rpyc than i copy ghpython with rpyc folders to Maxwell python folder and everything works great :slightly_smiling_face:

I am a bit reviving this post.
From your experience, would you still use GHPythonRemote today or there is a better option for conda environments for windows and mac os?

If I understand correctly RhinoCode does not work with conda environments and Hops works only on windows.

Hi Petras
I didn’t try Rhincode but i think you don’t need conda to use external modules
Install anything with pip
And for now GhpythonRemote is the best choice
And i see some plugins (gha) use python modules like Tunny

1 Like

Thank you for an advice :slight_smile:

Hi Petras,
I am the developer of Tunny.

Tunny uses an external Python module as mentioned by Seghier above.
The usage is based on a C# library called Pythonnet. This library is probably the same one used in Rhinocode.
A simple example of using it to create a GH component is shown below if you are interested.

163717982-72228839-5528-48a2-bea6-cf15d29fbbf9

1 Like

Hi @hiron ,

Could give a step of instructions for installation on a new pc?

Hi @Petras_Vestartas ,

You mean you can do it by above the Github instructions in the link above, but you don’t know how to do it because you have to build the component yourself from code?
If you need a gha file like a normal component, I can give you one I made.

I would like to ask what needs to be installed as external libraries or dependencies?

Is it the only library needed that is afterwards can be shipped with the GH plugin or something more?

Pythonnet is a library that allows you to use your own Python environment on your computer from C#, so you need Python environment in addition to Pythonnet.
As the term implies, your Python is used from C#, so you need to install the necessary python libraries into python yourself.