NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

linuxRT(cRIO 9037) pip install unsuccessful with python 2.7 or 3.3 installed

Solved!
Go to solution

Hi. I installed python2.7/3.3 in our linuxRT(cRIO 9037). However, I can not install pip successfully for it generate a error. I want to install some third party packages(such as numpy) in our cRIO project.

Can anyone help us on this problem?

 

 

0 Kudos
Message 1 of 20
(6,704 Views)

What error are you seeing when you try to install pip? 

0 Kudos
Message 2 of 20
(6,685 Views)

Hi Thanks for your so quickly reply.

 

I have installed python 2.7.9 succesfully.

However, when I try to install pip in linuxRT as following steps it generated error.

$ wget https://bootstrap.pypa.io/get-pip.py
$ python get-pip.py

The putty said "importerror, no module named pkgutil", as attachment picture.

0 Kudos
Message 3 of 20
(6,666 Views)

Are you able to run a simple python script? In any case, according to this documentation, pip may already be installed since you're using Python 2.7.9. 

0 Kudos
Message 4 of 20
(6,657 Views)

Hi 

I have checked. Python 2.7.9 can run basic script successfully. You can refer the attachment screen snipping. The python I installed just as NI instruction:

& opkg install python

After installed python, I have try to use:

&pip install -u pip

The pip function cannot work normally. It generate error: pip command not found.

I have tried to install the get-pip.py file as the link you provide to me. However, it generates a new error as the attached picture. (ImportError: No module named HTMLParser)

 

Could you provide more information on this issue?

0 Kudos
Message 5 of 20
(6,653 Views)

I found error:(ImportError: No module named HTMLParser) is for the reason of python 2.7 cannot support this file. I have use python 3.3 to run the command: python3 get-pip.py. It generate the similar error: "importerror, no module named pkgutil".

 


scotia673 已写:

Are you able to run a simple python script? In any case, according to this documentation, pip may already be installed since you're using Python 2.7.9. 


 

0 Kudos
Message 6 of 20
(6,647 Views)

Which version of the OS (as reported by MAX) are you using on your 9037? This matters as this will dictate the feeds that the controller is using (and python packaging can change from release to release). pip may be in a different python- package.

0 Kudos
Message 7 of 20
(6,644 Views)

Hi BradM,

     Thanks for your reply. The OS version is:

     9037 : NI Linux Real-Time x64 4.1.15-rt17-4.0.0f0

     I also tried this in 9035. It is also failed.

     9035: NI Linux Real-Time x64 4.1.15-rt17-4.0.0f0

 

     Can we select the installed Python version? How can I conduct this? I just find some .ipk files in the server from this link: 

https://forums.ni.com/t5/NI-Linux-Real-Time-Documents/Useful-SSH-Commands-for-configuring-Linux-RT-o...

http://feeds.angstrom-distribution.org/feeds/v2013.12/ipk/eglibc/x86_64/python/

 

If I want to install the software which is not include in the server. What can I do?

 

 


BradM 已写:

Which version of the OS (as reported by MAX) are you using on your 9037? This matters as this will dictate the feeds that the controller is using (and python packaging can change from release to release). pip may be in a different python- package.

Download All
0 Kudos
Message 8 of 20
(6,635 Views)

First, since you're using 2016, I would take a look at installing the python-pip package using the already-configured feed repositories.

 

As it stands, there's only one version of python 2 (2.7.9) and one version of python 3 (3.3.3) in the NI feeds for 2016.

 

Also, going back to your original question, there are python packages for many optional packages/eggs/etc. already on the feeds, including numpy.

 

Run opkg update && opkg list | grep python for an idea of what's available without needing to dive in too deeply.

0 Kudos
Message 9 of 20
(6,628 Views)

As a final thought, wanting to use other feed repos, especially older ones using a different version of the base C runtime (eglibc 2.18 vs. glibc 2.21), let alone differences in how the OE systems setup to build the contents of those repositories very well may work in many cases, but it is also an invitation to a lot of weird, hard-to-diagnose failures or errant behavior, so I would be careful if you intend on using other feeds.

 

tl;dr is "Don't use non-NI feeds unless you really, really need to and accept that you'll need to work out any problems that come from installing software from those feeds"

0 Kudos
Message 10 of 20
(6,626 Views)