Support Forum

externe module für AllplanPython installieren, pyyaml, yaml


Ich habe eine Python Modul (Part) welches mittels YAML arbeitet (http://pyyaml.org/wiki/PyYAML) heisst damit ich mein module nutzten kann muss ich innerhalb des PythonPart das modul yaml importieren, was natürlich fehlschlägt, weil pyyaml ja nicht installiert ist. Wenn ich pyyaml installieren will, funktioniert das auch nicht, da Allplan ja einen eigenen Python interpreter mitliefert, heisst die Intallationsroutine von pyyaml findet keinen Python interpreter für den pyyaml installiert werden soll.

Weiss jemand Rat, wie ich pyyaml (oder auch irgend ein anderes externes modul) explizit für den AllplanPythonInterpreter installieren kann. Heisst so installieren, dass es aus einem PythonPart mittels eines import MyExternalModul importiert werden kann.

gruss bernd

BIM, BAM, BOOM
BIM-Modelle Tragwerksplaner --> http://www.bimstatik.ch/
My Allplan PythonParts --> https://github.com/BIMStatik/AllplanPythonParts
LinkedIN --> https://ch.linkedin.com/in/bernd-hahnebach-269b855a

Den ort wo Allplan seine externen PythonModule hininstalliert habe ich gefunden, mhh viel weiter hilft mir das aber auch nicht ...

Bei mir ist das
C:\Program Files\Nemetschek\Allplan\Prg\Python\lib\site-packages

BIM, BAM, BOOM
BIM-Modelle Tragwerksplaner --> http://www.bimstatik.ch/
My Allplan PythonParts --> https://github.com/BIMStatik/AllplanPythonParts
LinkedIN --> https://ch.linkedin.com/in/bernd-hahnebach-269b855a

Hallo,

das Verzeichnis ist genau richtig.
Im Pfad C:\Program Files\Nemetschek\Allplan\Prg\Python findes Du eine vollwertige Python-Installation mit
den Command-Line-Interpretern pythonw.exe. Zum Installieren müsstest Du mal diese Interpreter starten.

Gruß Jörg

Hallo Bernd,

ich denke, das Setup von PyYaml zieht den Pfad aus dem Current-User-Eintrag aus der Registry (je nach Version):
HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore\3.5\InstallPath
bzw.
HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore\3.4\InstallPath

Du könntest den Eintrag entsprechend editieren, und den Allplan-Pfad eintragen:
C:\Program Files\Nemetschek\Allplan\Prg\Python

Ich schätze, das sollte dann funktionieren. Ich habe das aber leider nicht testen können.

Grüße,
Akin

Attachments (2)

Type: image/png
Downloaded 266 times
Size: 9,70 KiB
Type: image/png
Downloaded 248 times
Size: 37,85 KiB

Danke euch beiden für die Antworten. Hab mir die nögigen Pythonfiles schnell ins projekt kopiert und den path hinzgefügt, ist nen hack, dammit ich arbeiten kann. Das ist aber sicher keine Lösung. Vor allem nicht um das tool auf andere computer intern hier zu verteilen ...

Ich mag jörgs variante. Bei doppelklick auf pythonw.exe kommt aber eine Fehlermeldung. Ich hab ausser Allplan kein python3 installiert, aber die dll muss ja da sein, da sonst python in allplan nicht laufen würde.

gruss bernd

BIM, BAM, BOOM
BIM-Modelle Tragwerksplaner --> http://www.bimstatik.ch/
My Allplan PythonParts --> https://github.com/BIMStatik/AllplanPythonParts
LinkedIN --> https://ch.linkedin.com/in/bernd-hahnebach-269b855a

Attachments (1)

Type: image/jpeg
Downloaded 305 times
Size: 180,92 KiB

Hallo Bernd,

einfach die Python34.dll ins Verzeichnis C:\Windows\System32 kopieren.
Dann läufts...

Gruß Jörg

Quote by Nemo
einfach die Python34.dll ins Verzeichnis C:\Windows\System32 kopieren.
Yep, Danke Jörg und gruss bernd

BIM, BAM, BOOM
BIM-Modelle Tragwerksplaner --> http://www.bimstatik.ch/
My Allplan PythonParts --> https://github.com/BIMStatik/AllplanPythonParts
LinkedIN --> https://ch.linkedin.com/in/bernd-hahnebach-269b855a


https://connect.allplan.com/ uses cookies  -  More information

Accept