Jump to content
relume

Is there any possibility to update VW 2020 python version?

Recommended Posts

VectorWorks : v2020 SP2

MacOSX       : 10.14.6

 

Hello

 

I am facing big troubles to install some modules like "geopandas" to use them with VectorWorks 2020.

 

  • Actually I can install with an external python installation version 3.5.9 (the latest version in 3.5) all needed modules. Unfortunately there are some incompatibilities (for example for "pandas") while importing against the the internal VectorWorks 2020 python version 3.5.2 and its built-in functions.
  • So I installed a python 3.5.2 version from the official download page, but now it is not possible to locate any external module, that satisfy the requirements of version 3.5.2 and further I am getting errors that says:
  •   1 location(s) to search for versions of rtree:
      * https://pypi.python.org/simple/rtree/
      Getting page https://pypi.python.org/simple/rtree/
      Looking up "https://pypi.python.org/simple/rtree/" in the cache
      Returning cached "301 Moved Permanently" response (ignoring date and etag information)
      Looking up "https://pypi.org/simple/rtree/" in the cache
      Cache entry deserialization failed, entry ignored
      Starting new HTTPS connection (1): pypi.org
      Could not fetch URL https://pypi.python.org/simple/rtree/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:

It seems that VW 2020 python version 3.5.2 is really outdated  and thus it would be "best" to update the internal VW version to 3.5.9 at least. Is this feasible and how?

 

Many thanks,

 

relume

 

 

Share this post


Link to post

The python install Is a resource library within the VW application bundle, and all python commands run with this environment. You can designate paths to external modules, but not to a different environment. This should be a standard install of 3.5.2. 
 

In theory, you could update python here, however you could risk breaking the internal vs commands. 
 

If you’re using something like pip to install external modules, I would:

 

- Install 3.5.2 in the OS and set as the default py3 environment.
- Run your installers and test in python 3. 

- Point Vectorworks external paths option (Script settings) to the directory where pip installed your modules. 

Share this post


Link to post

Hello JBenghiat

 

Thank you very much for your message.

 

Yes I had allready carried out the same steps as your hints, prior to post the topic.

 

Finally I could resolve the problem with the 3.5.2 installer that was broken for a outdated SSL certificate (with pip it was not possible any more to get the python "pypi.python.org" cache for looking about python packages. Neither it was possible to update PIP for the same reason. Updating PIP resolved the problem:

 

curl https://bootstrap.pypa.io/get-pip.py | python3.5

where python3.5 is the python version installed from 3.5.2

 

best regards,

 

relume

 

 

Share this post


Link to post

Hi @relume and @JBenghiat did you manage to get it to work?

 

First note that Vectorworks embeds the python engine, which means that Vectorworks is the python. So, if you just update your local python you are not really affecting vectorworks at all. So as Josh suggested, you can download the 3.5.2 on the side and manually copy it over into the Vectorworks bundle.

 

However, there might be problems with this. There are two sides of python: first it's the engine itself, it is linked, embedded into Vectorworks, and there is no way to change it unless we rebuild Vectorworks on our end. 

 

The second part is the python built-in libraries. This is what you would be updating if you just copy them into the Vectorworks bundle. I guess it would work as long as python engine supports the new bundle directly. Of course you can try, just test it out carefully as not to have strange effects on other python based features.

 

Regards,

Vlado

Share this post


Link to post

Hello Vlado

 

Thank you very much for your response.

 

That clarifies what I was assuming – but hopped it is not the case.

But it is the reason why in VW python "sys.excecutable" on the MacOS/darwin plattform is pointing to the VW app, and why "pyhton" and "pip" are not exectuable on the command line inside the darwin VW app package/bundle (error : missing python image).

 

It would makes only sens to install an additional python installation inside the VW app/bundle, if this will replace the internal VW python environment to run the scripts. But after some days finally I was able to install 3.5.2 and get it run as standard installation on the MacOS . This 3.5.2 standard system installation is only used to get the rigth modules (like geopandas and some related modules) installed an be used in VW (installed on '~/Library/Application Support/VectorWorks/2020/Python Externals').

 

But I have also to say that python 3.5.2 is for lot of modules a critical version. Python 3.5.3 is much less critical - but module versions loaded with 3.5.3, were incompatible with 3.5.2. Thus I would very appreciate, if in VectorWorks a more recent version of python would be embedded - at least the latest version of an allready EOL minor version - for python 3.5 > 3.5.9. But meanwhile python 3.7 is very common, not pointing to python 3.8.

 

Many thanks again and best regards,

 

relume

 

Share this post


Link to post
1 hour ago, relume said:

But it is the reason why in VW python "sys.excecutable" on the MacOS/darwin plattform is pointing to the VW app, and why "pyhton" and "pip" are not exectuable on the command line inside the darwin VW app package/bundle (error : missing python image).

 

Well, the equivalent of the console command 'python' is a Vectorworks document script. You can execute pip-like stuff that way.

Also, note that python is very flexible in the sense of libraries. Perhaps you can try moving only the necessary stuff into the users folder: <user name>/Plugins

By default vectorworks will add that location to the search path of the python engine. So if you can isolate necessary needed pieces, you can provide them there. This is, of course, if there is no conflict with the exiting packages in the app bundle.

 

1 hour ago, relume said:

But I have also to say that python 3.5.2 is for lot of modules a critical version.

 

I'll make it a point to update for the next release.

  • Like 1

Share this post


Link to post

Hello Vlado

 

Many thanks again, I appreciate very much your considerations.

Share this post


Link to post

Yes, I agree with it.

 

If you’re using something like pip to install external modules, I would:

 

- Install 3.5.2 in the OS and set as the default py3 environment.

- Upgrade pip version.
- Run your installers and test in python 3. 

- Point Vectorworks external paths option (Script settings) to the directory where pip installed your modules. 

 

Best regards,

Share this post


Link to post

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...