- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Best way to install additional Python modules on NetMRI appliance?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-09-2018 04:20 PM
I would like to install some additional Python modules for use in NetMRI scripts. It doesn't look like pip is installed in the sandbox by default. What is the best way to install new modules to have them work from scripts and not interfere with any system processes? Thanks for any info.
Re: Best way to install additional Python modules on NetMRI appliance?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-06-2018 08:55 AM
SSH into the NetMRI appliance type in “sandbox login”
Then run the following
I used the following get-pip.py script to install it and then we were able to install other modules via “pip install”
So now in the UI Python scripts you can use the new installed module.
NOTE: I have not tested if the “sandbox” gets upgraded, if it resets these modules or not.
[root@sandbox ~]# wget https://bootstrap.pypa.io/get-pip.py
--2017-12-21 08:14:20-- https://bootstrap.pypa.io/get-pip.py
Resolving bootstrap.pypa.io... 151.101.188.175
Connecting to bootstrap.pypa.io|151.101.188.175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1595408 (1.5M) [text/x-python]
Saving to: `get-pip.py'
100%[===========================================================================================>] 1,595,408 212K/s in 11s
2017-12-21 08:14:32 (145 KB/s) - `get-pip.py' saved [1595408/1595408]
[root@sandbox ~]# python3 get-pip.py
Collecting pip
Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 105kB/s
Collecting wheel
Downloading wheel-0.30.0-py2.py3-none-any.whl (49kB)
100% |████████████████████████████████| 51kB 113kB/s
Installing collected packages: pip, wheel
Successfully installed pip-9.0.1 wheel-0.30.0
[root@sandbox ~]# pip install whateveryou want
Twitter: https://twitter.com/sifbaksh
https://sifbaksh.com
Re: Best way to install additional Python modules on NetMRI appliance?
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-06-2018 10:45 PM - edited 06-06-2018 10:47 PM
If there is no internet connection on the sandbox you can use the following workaround to upload script or modules to sandbox:
Upload the script or module to the sandbox environment by using SCP to send the file into the administrator shell's /Backup/Sandbox directory (below is an example):
scp get-pip.py admin@172.23.28.2:/Backup/Sandbox
In the administrative shell, the /Backup/Sandbox directory maps to the /mnt/host/data/userdata directory inside the sandbox. After the file has been successfully uploaded to the sandbox, login to the sandbox via the administrative shell.
sandbox login
Once inside the sandbox, use the standard installation procedure to install script or modules located at
/mnt/host/data/userdata. As an example:
#cd /mnt/host/data/userdata |
#python3 get-pip.py |
#pip install package_name
|
The above information will also be added to Admin Guide in Future Releases of NetMRI
Re: Best way to install additional Python modules on NetMRI appliance?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-13-2020 07:31 AM
Trying to install python3 get-pip.py, but it says that I need Python 3.5 onwards.
RuntimeError: Python 3.5 or later is required
My version is
[root@sandbox ~]# python3 -V
Python 3.4.3.
I am currently running the NetMRI V7.4.4
Can anyone suggest the next course of action.
Thanks
Russ
Re: Best way to install additional Python modules on NetMRI appliance?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-13-2020 08:47 AM
You need to get the older version using the following:
wget https://bootstrap.pypa.io/3.4/get-pip.py
Twitter: https://twitter.com/sifbaksh
https://sifbaksh.com
Re: Best way to install additional Python modules on NetMRI appliance?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-14-2020 03:19 AM
Many thanks Sif,
That works...
Is there a plan to include later versions of python in NetMRI?
V3.4 is out of support now.
Thanks
Russ