Python and PIP3 installation in PLCnext FW 2021 LTS
Hi guys, I have been trying to install Python and PIP3 on PLCnext FW 2021 LTS but failed to get it done. Can you tell me which is the most appropriate procedure to perform this operation, I have tried the ipkg method and found another way in Makers blog using curl, and it throws me errors.
I'll look forward for your answer
Comments
for just having PIP on the device you don't need the ipkg. Please check Stijns "https://www.plcnext-community.net/en/hn-makers-blog/425-installing-pip-without-ipkg.html" how to install pip without ipkg, works great for me.
Take care,
Frank
I was able to perform the installation, now my question is how to install the libraries requests, urllib3, sys?
I tried to use the pip but it didn't work.
Hi,
I've just installed requests via pip with the following procedure:
urllib3 comes already with requests as dependency, so you don't have to install it seperately.
Keep in mind that the PLCnext Control does not have gcc onboard, so you can only deploy native python packages.
CPython based packages (like e.g. numpy) have to be crosscompiled first, before you can use them.
I know that some community users already done that, but that is beyond my knowledge ?.
Hope that helps,
Frank
When I did run "python3 get-pip.py" I got the following error.
epiroc@axcf2152:~$ python3 get-pip.py
Defaulting to user installation because normal site-packages is not writeable Collecting pip Using cached pip-22.0.3-py3-none-any.whl (2.1 MB) Collecting setuptools Using cached setuptools-60.9.3-py3-none-any.whl (1.1 MB) Collecting wheel Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB) Installing collected packages: wheel, setuptools, pip ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/opt/plcnext/.local/lib' Check the permissions.
When I used "sudo python3 get-pip.py"
It seems that I cannot reach to all folders. Although, my user is set as admin.
epiroc@axcf2152:~$ sudo python3 get-pip.py
Password: Sorry, user epiroc is not allowed to execute '/usr/bin/python3 get-pip.py' as root on axcf2152.
I login with admin user and used the password that was typed on the PLC I had the same issue. I would be appreciated it if you could help.
This page explains how to log in as root:
https://www.plcnext.help/te/Operating_System/Root_rights.htm