Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Python of VRED with library numpy

Anonymous

Python of VRED with library numpy

Anonymous
Not applicable

I'm having a problem with the numpy library in python that VRED uses that is version "2.7.10", I put import numpy (Detail of the error in the image). However when I install python of the same version on my computer I can use the numpy library. Thank you in advance.

0 Likes
Reply
Accepted solutions (2)
3,061 Views
8 Replies
Replies (8)

michael_nikelsky
Autodesk
Autodesk
Accepted solution

VRED 2017 is build using Visual Studio 2015, the normal available python is build with a very old Visual Studio 2010 or even Visual Studio 2008 and therefore a lot of the third party modules are build with this old compiler as well. These don´t work with our python build so you will have to recompile them for visual studio 2015 or find matching versions on the web. I think http://p-nand-q.com/python/building-python-27-with-visual_studio.html has a compiled version to download which contains a lot of third party packages, including numpy.

 

 



Michael Nikelsky
Sr. Principal Engineer

Anonymous
Not applicable

Thanks comrade, as I understand it, is to replace the python of VRED with the python of visual studio?

0 Likes

michael_nikelsky
Autodesk
Autodesk
Accepted solution

No, never do that, if you replace the python version VRED ships with, VRED will completely stop working. You will have to compile or download the correct version of the numpy lib and put it into the C:\Program Files\Autodesk\VREDPro-9.x\lib\python\Lib\site-packages directory. Then it should work with VRED if the numpy was compiled with the correct compiler (Visual Studio 2015).

 

Kind regards

Michael



Michael Nikelsky
Sr. Principal Engineer

Anonymous
Not applicable

Hello

how to get numpy work for VRED Pro 2018.n ??

Don't tell me anything else from NERDISTAN like the stuff written before in this thread!!!!!

 

 

 

0 Likes

michael_nikelsky
Autodesk
Autodesk

Have not testet it but should work:

 

Go to http://p-nand-q.com/python/building-python-27-with-visual_studio.html

Download the Visual Studio 2015 x64 package and extract it

Copy everything to your C:\Program Files\Autodesk\VREDPro-x\lib\python folder (you should probably not override the stuff we already have in there).

 

Kind regards

Michael

 



Michael Nikelsky
Sr. Principal Engineer

Anonymous
Not applicable

 

SUCCESSS!!

 

I downloaded Python 2.7.10 64-bit from here: http://p-nand-q.com/python/building-python-27-with-visual_studio.html

 

Unbenannt.JPG

 

 

 

This version has many python plugins already installed under "site-packages"  i.a. "numpy" which is the one we need.

 

To use it in VRED insert the follwoing code:

 

import sys, os
sys.path.append(os.path.normpath(r'C:\2015.08.07-Python2710-x64-vc2015\Lib\site-packages'))

import numpy as np
print('numpy imported as "np"')

 

 

 

 

Unbenannt.JPG

 

Anonymous
Not applicable

Thanks for posting this . I followed those steps and finally I imported numpy file into vred python file .

0 Likes

Anonymous
Not applicable

Hey!

Thanks for the hint of appending the sys path! I assumend all the time that it should be deteced automatically since i copied it in the path of the program!

 

Finally got it working!

0 Likes