20tab / UnrealEnginePython

Embed Python in Unreal Engine 4
MIT License
2.77k stars 754 forks source link

How to import python library?(eg.numpy) #800

Closed BulletHermit closed 5 years ago

BulletHermit commented 5 years ago

What do I need to do if I want to import a third-party library(eg. numy)?

Schizo commented 5 years ago

Depending on whether you are using embedded python or not, you can use pip to install any package.

HanChangHun commented 5 years ago

In my case I added a python path by entering below code in unreal engine plugin code.

import sys
sys.path.append("D:/USER/py36/Lib/site-packages")
sys.path.append("C:/Python27/Lib/site-packages")

and It worked.