[New Feature Preview] Python 3 Support Issue Thread

That is a huge step forward, needs some extra time to get used to it, but indeed it is a great enhancement.
Thank you

2 Likes

This is huge! It should be really cool to see how this affects the tools that people are making. I can see it opening the door a bit more for how people are going to use Generative Design. in Revit 2021. Using Numpy and Pandas alone is going to be such a game changer. Cheers Dynamo Team.

I wonder if selenium extension will work and weā€™ll be able to interact with our browser as well?

3 Likes

Hello great news!
the name CPython3 can be confusing for me
it is an implementation of Python.Net or standard Python3 without .NET (CPython) ?

1 Like

Wow, this is really good news!

How do you plan to support the installation of packages by the user?

I ask this because we went through some dynamo packages dependencies nightmares in the past, and if you take the route of pyRevit (CPython engine + same version external python distribution for site-packages) it would be unmaintainableā€¦

Maybe something like a per-graph virtualenv with pinned packages?
A graph could contain the list of used packages (requirements), and dynamo could create a virtualenv and install those packages on open/first runā€¦

2 Likes

Amazing! Finally all sorts of cool libraries will be available in Dynamo!

1 Like

These two links may help people to understand the changes between python 2 and 3 :slight_smile:

Porting code from python 2 to python 3 - How to port Python 2 Code to Python 3 ā€” Python 3.12.1 documentation
Python 3 in depth guide - http://python3porting.com/

4 Likes

We will be using the standard, native Python Interpreter, CPython, and using the pythonNet bridge project to call the CPython interpreter.

3 Likes

@solamour
Thankā€™s for the clarification
Unfortunate that Ironpython 3 is still not released (even if work has resumed recently)

2 Likes

These are definitely steps in the right direction. The more capability the built in editor has the better.

Does the python editor still default to ironpython for the time being?

Blockquote
Does the python editor still default to ironpython for the time being?

yes, the python 3 integration has a lot of rough edges / known issues that we are tracking and will add to this thread.

3 Likes

This is great news. I remember asking about this when we had you and @Racel when we had a Q&A with the Tel Aviv Dynamo User Group, Dec/2018. Just wondering Is this going to be a way for other python-revit interfaces such as pyRevit (I think I saw something about PyRevit & Python 3ā€¦) and the Revit Python Shell. ?

1 Like

Hello Jonathan! Long time no hear :slight_smile:

We are not actively working on any other Python interfaces as the teams domain is only Dynamo. So in this case, itā€™s how you access Python inside of Dynamo; via IronPython2 (Retained existing approach) and CPython3 (New addition). Both of these are accessible via the Python Script node.

Hey, iā€™m a complete newbie, and all posts above contain many words that donā€™t make sense for me, but this seems like a good place to ask - can you guys share good repos or resources to learn Python for Revit/Dynamo?
Cheers!

2 Likes

You can start from https://primer.dynamobim.org/10_Custom-Nodes/10-4_Python.html if you have not gone through that.

1 Like

You can also check out the following:

4 Likes

We can use pandas now!? My god, I love you guys! Python 3 is going to be a huge improvement!

2 Likes

You can use it soon! Weā€™re deep into the weeds of upgrading IronPython2 to CPython3 which will unlock all of that good stuff :slight_smile:

If you want to try a janky build right now, itā€™s available on the dynamobuilds.com website as are all our builds - but be forewarned its not fully working yet :pray: ā€¦ Lots of rough edges and some broken stuff!

3 Likes

Is there any functionality planned for some sort of copying of nodes to CPython3 format? I absolutely love that in ArcGIS pro I am able to take any process I do and copy a code version of it. Which Iā€™ll take and implement into a Jupyter notebook. Some sort of functionality such as this could be a game changer for people who understand python but not the syntax of how to interact with civil 3d entities. Much like when I use the arcpy module.

1 Like

Great Work!!! Thank you, Dynamo Team!
Iā€™m looking forward to use CPython on Revit, and hopefuly numpy, scipy and sklearn.

Could you give me an idea to install the Dynamo2.7 in Revit? I want to try in Revit.

There is no supported way to install 2.7 into Revit. After 2.0.3 all Dynamo updates are tied to Revit updates.

2 Likes