Community
VRED Forum
Welcome to Autodesk’s VRED Forums. Share your knowledge, ask questions, and explore popular VRED topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Python of VRED with library numpy

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
Anonymous
2897 Views, 8 Replies

Python of VRED with library numpy

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.

8 REPLIES 8
Message 2 of 9
michael_nikelsky
in reply to: Anonymous

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
Message 3 of 9
Anonymous
in reply to: michael_nikelsky

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

Message 4 of 9
michael_nikelsky
in reply to: Anonymous

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
Message 5 of 9
Anonymous
in reply to: Anonymous

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!!!!!

 

 

 

Message 6 of 9
michael_nikelsky
in reply to: Anonymous

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
Message 7 of 9
Anonymous
in reply to: Anonymous

 

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

 

Message 8 of 9
Anonymous
in reply to: Anonymous

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

Message 9 of 9
Anonymous
in reply to: Anonymous

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!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report