tbexon Posted October 7, 2020 Share Posted October 7, 2020 So I just moved all my plugins across to VW 2021, and I'm now getting Import Errors for Plug ins that use the External Package PyOpenSSL. The error i'm getting is: DLL load failed while importing _openssl: The specified module could not be found. I've tried both deleting and reinstalling PyOpenSSL via VerifyOrGetLib, aswell as simply copying the working "Python Externals" from 2020 Plug in folder, neither seems to solve the issue. Pip does seem to be successfully installing PyOpenSSL, with the most up to date versions of it's dependents. I'm aware that with 2021 the Python distribution has been upgraded to 3.8, so I'm wondering if something to do with that could be causing this? Checking the docs here it is compatible with 3.5+ I don't believe it's an issue with the package itself as if I install it, and run from my local copy of Python 3.8 via IDLE it imports fine. Any thoughts would be greatly appreciated! This is rather where my knowledge reaches it's limit! Quote Link to comment
DomC Posted October 23, 2020 Share Posted October 23, 2020 Hi Same issue here. I think the installation of Python Moduls via VerifyOrGetLib still works. I had not much time to go deeper into that problem. Spontaneously I would say, Vectorworks 2021 uses "Python Externals" as the installation Path and "PythonExternals" as the search Path or "Python Externals" do not work anymore for the Script Engine. Also it is confusing, I cant set the Folder "Python Externals" as a search Path of a Python Script. As a short fix I was able to Install all Moduls with the Marionette nodes. After That renaming "Python Externals" to "PythonExternals" and it worked. Tried this on Mac, Installed new Pillow Fork with the Node. Then Renamed the Python Externals Folder and all my old "Pillow" Examples worked here. Beside that here I have an issue, that Marionette Scripts do not "Alert" Errors. I had to thest with Text-Scripts. Hope that Workaround is able to fix it also for your Scripts. Regards import numpy scipy pillow etc v2021.vwx Quote Link to comment
Vectorworks, Inc Employee K.Lalkovski Posted October 27, 2020 Vectorworks, Inc Employee Share Posted October 27, 2020 @tbexon Where do you receive this behavior om Mac OS or Windows? Quote Link to comment
DomC Posted October 27, 2020 Share Posted October 27, 2020 (edited) Just tried on Mac (10.14.6 Mojave) Did again some test with a blank user folder and Build 571107. I did the following: 1. Installed PIL with the attached Marionette Node 2. Tested to import PIL by Script or Marionette Node > Failed Module not found 3. Tried to set search-Path to "Python Externals" > Failed 4. Tried running Marionette Node with this Module > Failed 5. Renamed folder to "PythonExternals" 6. Setting search Path to that Folder in a Script > OK 7. Tested import of the Module in Script > OK 8. Running Marionette Example with PIL > OK 9. Renamed back "PythonExternals" to "Python Externals" run again Marionette Example > OK (now I am confused, maybe a caching thing) InstallPillow.mp4 Movie attached Edited October 27, 2020 by DomC Quote Link to comment
DomC Posted October 29, 2020 Share Posted October 29, 2020 Hello I looked into the Scripts from Marissa and Sarah and their .whl Installers are Working. So I think it is just an issue of the correct Library Installer. The .whl Installer I used, creates an error because of PIP incompatibility. And then I think the issue is, that not immediately the library can be imported. I will try Update this Stand-Allon-Installation-Nodes ca. middle next week. Quote Link to comment
tbexon Posted October 29, 2020 Author Share Posted October 29, 2020 On 10/27/2020 at 3:15 PM, K.Lalkovski said: @tbexon Where do you receive this behavior om Mac OS or Windows? I'm running Windows @domC Following you're suggested process, I got the same results. Strangely when I look at the environment paths within the VW Python environment, using sys.path(), "Python Externals" is in there. I'm still having issues with my specific package (pyOpenSSL) DLL load failed while importing _openssl: The specified module could not be found. If I try running with a clean 3.8 interpreter outside of VW it runs fine, same as within 2020. Quote Link to comment
Nomi Posted December 24, 2020 Share Posted December 24, 2020 Hi all, Numpy_2021.pdf I'm trying to install numpy in Vectorworks 2021 with no success - I've updated the install nodes from @DomC with the 3.8 version of numpy (see attached), and tried renaming External Packages to ExternalPackages. Don't quite understand the bit about PIP incompatibility - any help appreciated! Thanks, Naomi Quote Link to comment
Antonio Landsberger Posted December 25, 2020 Share Posted December 25, 2020 @Nomi If you're on Windows, try Numpy 1.19.3 instead of 1.19.4: https://files.pythonhosted.org/packages/a4/23/13d2991c156cfd22bfd4a9ae6dcb1a9372004a0e16508b680d17f3280eb4/numpy-1.19.3-cp38-cp38-win_amd64.whl Windows 10 introduced an issue with the 2004 update:https://developercommunity.visualstudio.com/content/problem/1207405/fmod-after-an-update-to-windows-2004-is-causing-a.html Quote Link to comment
Nomi Posted December 25, 2020 Share Posted December 25, 2020 Great, thanks for the help. Grabbed a node from Sarah and that did the trick. Quote Link to comment
BillW Posted January 9, 2022 Share Posted January 9, 2022 I tried running DomC's node "Install numpy" on it's own and got an error "module numpy cannot be downloaded". Running VW 2020 SP6 on PC I checked the file path from https://pypi.org/project/numpy/1.17.4/#files and copied link to check and it matched the node entry below: numpy = 'https://files.pythonhosted.org/packages/25/71/37628d7654da4a539f33497c9d9d6713d2bb3c9e35638776b3eea38ca04a/numpy-1.17.4-cp35-cp35m-win_amd64.whl' I even tried pasting into a browser which allowed me to download ".whl" file. I tried alternative pre path "https://pypi.python.org/packages" - same error I even tried (as VW2020 uses Python 3.5) https://files.pythonhosted.org/packages/ed/09/ff8f529a5548ff788765f66a81ef751130f26f8c7d517e94d3dbf3ba1ed5/numpy-1.18.5-cp35-cp35m-win_amd64.whl I'm kind of stuck Quote Link to comment
BillW Posted January 11, 2022 Share Posted January 11, 2022 Just to say I successfully loaded numpy "1.18.5 cp35" in VW2021 via DomC's node and copied the folder "Python Externals" back to folder ...Appdata/Roaming/Nemetschek/Vectorworks/2020 I also successfully ran script below import numpy as np a = np.asarray((1,0,0,0,1,0,0,0,1)) vs.AlrtDialog(str(a)) I can now learn/try out some open source python code for Euler/Quaterion rotations. 1 Quote Link to comment
Jayme McColgan Posted January 20, 2022 Share Posted January 20, 2022 ive found the built in ways to be very inconsistant... currently anytime i need to add a external python library i do a normal pip3 install and go find where it installed it which normally for me is in "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages". i then copy and paste the installed libraries into a "Python Externals" folder in the user folder and its worked every time so far. i think i have 5-6 libraries in there. Quote Link to comment
Vectorworks, Inc Employee K.Lalkovski Posted July 25, 2022 Vectorworks, Inc Employee Share Posted July 25, 2022 On 10/7/2020 at 6:26 PM, tbexon said: So I just moved all my plugins across to VW 2021, and I'm now getting Import Errors for Plug ins that use the External Package PyOpenSSL. The error i'm getting is: DLL load failed while importing _openssl: The specified module could not be found. I've tried both deleting and reinstalling PyOpenSSL via VerifyOrGetLib, aswell as simply copying the working "Python Externals" from 2020 Plug in folder, neither seems to solve the issue. Pip does seem to be successfully installing PyOpenSSL, with the most up to date versions of it's dependents. I'm aware that with 2021 the Python distribution has been upgraded to 3.8, so I'm wondering if something to do with that could be causing this? Checking the docs here it is compatible with 3.5+ I don't believe it's an issue with the package itself as if I install it, and run from my local copy of Python 3.8 via IDLE it imports fine. Any thoughts would be greatly appreciated! This is rather where my knowledge reaches it's limit! Hi TBexon, I do not know if you have found the solution for your issue or still interested in running PyOpenSSL with Vectorworks, but on Friday I started looking at this problem while resolving a bug from Dominique about the serch path. The DLL that pyOpenSSL looks for is python3.dll.It is in python's folder where also python.exe resides. This path is included in the python search paths in VW. For some reason the code of pyOpenSSL when installed cannot find python3.dll.It's package's code search problem. If you copy python3.dll from python's folder to VW application folder(where VW exe resides) you will be able to use pyOpenSSl. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.