Archicad – Python – and Anaconda/Miniconda

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-08-02
01:53 PM
- last edited on
2021-09-15
09:55 AM
by
Noemi Balogh
It either reports error R6034 (which can be mitigated by renaming all "msvcr90.dll" files inside the *conda folder).
But afterwards, if you open the Python palette the search for an interpreter just stucks inside a loop, where it never finds one. What is even more funnier, because
You can stop the ongoing search loop, but then the Python palette is worthless, since you can't use it. Not so dramatic either, since you can do everything in VSCode as well.
BUT if you try to close Archicad in the end: you can't! The files closes, but AC refuses to go away and has to be sniped from orbit with the taskmanager...
So, please either fix this, GS, or just let the user help and point to the right interpreter...

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
Solved! Go to Solution.
- Labels:
-
Automation (Python or JSON)
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-08-10 12:47 PM
runxel wrote:Thank you for pointing out this issue!
Seems like the registry key only helps, if AC already found an interpreter, otherwise it doesn't work – which is quite useless in a case like mine...
You're absolutely right. I added this to our bug database: DEF-1519 (PythonUI/CustomLocation registry key only helps if AC already found an interpreter)
Until we fix the bug, as a workaround I would suggest you to add at least one python interpreter path to the PATH environment variable. That way Archicad will be able to find an interpreter and you will be able to open Python Options to select the interpreter.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-08-03 10:17 AM
You can set the PythonUI/CustomLocation (String Value) registy key to the location of the interpreter.
Hope it helps,
Viktor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-08-03 01:23 PM
Viktor wrote:Hey Viktor, thank you for this info!
You can set the PythonUI/CustomLocation (String Value) registy key to the location of the interpreter.
Where exactly in registry shall this key be, tho? The regedit search didn't found it, and looking by hand it's definitely not in Computer\HKEY_CURRENT_USER\Software\GRAPHISOFT\
So what I did instead was making a new key named "PythonUI" inside of Computer\HKEY_CURRENT_USER\Software\GRAPHISOFT\ARCHICAD\ARCHICAD 24.0.0 GER R1\
And then a new string value named "CustomLocation" set to the path to the custom Python interpreter.
This however didn't work out, either....

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-08-04 03:50 PM
Thank you very much for reporting the issue, and I am very sorry about the experience!
I tried to replicate the issue, by removing any trace of Python in my computer. After that, I download the latest Anaconda installer (2020.7) from their website and install it. Upon checking in Archicad, the interpreter is loaded correctly, there was no constant loop or error message appear (as can be seen in the attached screenshot below).
Could you let me know at which point did you encounter the error R6034?
Thank you very much!
Best regards,
Minh
Minh Nguyen
Technical Support Engineer
GRAPHISOFT

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-08-04 10:28 PM
Thank you so much for replying!
The R6034 error shouldn't actually matter. It is a well known problem, because there can be only one msvcr90.dll loaded at any time. Also the renaming helped with that and you don't need that dll anyway.
Since you had a nice and clean new install I think your default environment is already Python 3.x.
I did a lot of work on IronPython previously and I have an older install of Miniconda so my
So it seems Archicad has problems finding the virtual env interpreter then, huh?
Do you know about the registry item? Maybe if you or Viktor can shine a bit more light on it I'm still able to use my current install.
It is also a bit dumb with *conda, because while you can install as many Python versions as you want, it doesn't support changing the default Python....

So yeah, maybe I still need to reinstall everything. Or maybe Pipenv is a good alternative....?
POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-08-05 01:56 PM
Thank you very much for the clarification! I never have more than one Python environment installed, therefore I never encountered such errors. Let me ask for some help from the development team with this issue. As soon as I have an answer, I will get back to you!
Best regards,
Minh
Minh Nguyen
Technical Support Engineer
GRAPHISOFT

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-08-10 11:42 AM
runxel wrote:Hi,
Viktor wrote:So what I did instead was making a new key named "PythonUI" inside of Computer\HKEY_CURRENT_USER\Software\GRAPHISOFT\ARCHICAD\ARCHICAD 24.0.0 GER R1\
You can set the PythonUI/CustomLocation (String Value) registy key to the location of the interpreter.
And then a new string value named "CustomLocation" set to the path to the custom Python interpreter.
This however didn't work out, either....![]()
The registry key should be created and set manually, so you did well.
I attached a screenshot from my registry and the python versions found by the Python Palette. In the Python Options dialog you can activate the desired python environment.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-08-10 12:06 PM
Tibor wrote:
The registry key should be created and set manually, so you did well.
Hi Tibor, thank you so much for clarification!
However I now see that there is a difference between what I want to achieve and what this technique can offer.
See, if one opens the Python palette, AC will try to find an Archicad interpreter but fails to do so. That's when I thought the registry key could help. But after you click on "abort the search" the palette opens like this (see attached image).
Seems like the registry key only helps, if AC already found an interpreter, otherwise it doesn't work – which is quite useless in a case like mine...
POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-08-10 12:47 PM
runxel wrote:Thank you for pointing out this issue!
Seems like the registry key only helps, if AC already found an interpreter, otherwise it doesn't work – which is quite useless in a case like mine...
You're absolutely right. I added this to our bug database: DEF-1519 (PythonUI/CustomLocation registry key only helps if AC already found an interpreter)
Until we fix the bug, as a workaround I would suggest you to add at least one python interpreter path to the PATH environment variable. That way Archicad will be able to find an interpreter and you will be able to open Python Options to select the interpreter.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-08-10 01:05 PM
Tibor wrote:Great! Thanks again, Tibor! 🙂
Thank you for pointing out this issue!
You're absolutely right. I added this to our bug database
For now I just use my Python from VSCode directly, which works like a charm.
POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»