cancel
Showing results for 
Search instead for 
Did you mean: 

Install librares on python

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Hi all.

 

Is it possible to add libraries from PyPi (via pip for example)  or through 

python setup.py install

to NX's Python interpreter ?

 

Or at leat launch NX's Python interpreter from command line in Windows.

 

 

3 REPLIES

Re: Install librares on python

Siemens Phenom Siemens Phenom
Siemens Phenom

You cannot add libraries to the interpreter delivered with NX.

 

You can direct NX to use an external interpreter. See "Using external Python distribution" in the Programming Tools Product Notes.

 

Also, search this forum for previous posts by AlexLee as there are relevant discussions from earlier this year.

Re: Install librares on python

Genius
Genius

You can install an external version of Python 3.3.2 with these environment variables. 3.3.5 may also work.

 

I have had mixed results installing external libraries with pip. Some worked just fine, some did not.

 

Python 3.3.2 64 bit. These worked but no external libraries were installed

UGII_PYTHONPATH=C:\Python33;C:\Python33\DLLs;C:\Python33\lib;C:\Python33\lib\site-packages;C:\Program Files\Siemens\NX 10.0\UGII\python

UGII_PYTHON_HOME=C:\Python33

UGII_PYTHON_LIBRARY_DIR=C:\Windows\System32 or C:\Python33\DLLs (depending on how you installed Python)

Re: Install librares on python

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Thank you.

 

I've read Using external Python distribution

 

And my way is:

 

1. Install WinPython 3.3.5.9 x64 to c:\winpy3359_64

2. Add folowing changes to c:\Siemens\NX10\UGII\ugii_env.dat

 

UGII_PYTHONPATH=C:\winpy3359_64\python-3.3.5.amd64;C:\winpy3359_64\python-3.3.5.amd64\DLLs;C:\winpy3359_64\python-3.3.5.amd64\Lib;C:\winpy3359_64\python-3.3.5.amd64\Lib\site-packages;C:\Siemens\NX10\ugii\python


UGII_PYTHON_LIBRARY_DIR=C:\winpy3359_64\python-3.3.5.amd64

And that is all! It works for me. I use NX 10 without any updates.

 

My Python interpreter is located in

C:\winpy3359_64\python-3.3.5.amd64