rakeshchhikara / IOS-XR_TAC-Log_Automation

Other
1 stars 0 forks source link

Issues when we have Python3 on host #1

Open sisodia72 opened 2 years ago

sisodia72 commented 2 years ago

Use below method: $ mkdir script && cd script script]$ virtualenv -p python3 venv1 script]$ source venv1/bin/activate script]$ python -m pip install --upgrade pip script]$ pip install netmiko==3.4.0

Then create the .py file with the script for execution.

In case you followed the old procedure you should not be able to create the venv1 in first place. In case you succeded and getting below error: _(venv1) [viksisod@xyz script]$ python3 ios-xr_log_collection_v1.py Traceback (most recent call last): File "ios-xr_log_collection_v1.py", line 14, in from netmiko import ConnectHandler File "/home/users/viksisod/script/venv1/lib/python3.6/site-packages/netmiko/init.py", line 29, in check_python_version() # type: ignore File "/home/users/viksisod/script/venv1/lib/python3.6/site-packages/netmiko/init.py", line 26, in check_python_version raise ValueError(msg) ValueError:

Netmiko Version 4.1.2 requires Python Version 3.7 or higher. 🐍_

Please go ahead and uninstall the newer Netmiko version and install the required netmiko using below: script]$ pip uninstall netmiko script]$ pip install netmiko==3.4.0

HTH Vikram

rakeshchhikara commented 2 years ago

Thanks Vikram

Seems it started with new Netmiko version. If possible, upgrade Python to 3.7 or higher. Else netmiko lower version would be required.

Thanks Rakesh

On Wed, 24 Aug 2022 at 9:44 AM, sisodia72 @.***> wrote:

Use below method: $ mkdir script && cd script script]$ virtualenv -p python3 venv1 script]$ source venv1/bin/activate script]$ python -m pip install --upgrade pip script]$ pip install netmiko==3.4.0

Then create the .py file with the script for execution.

In case you followed the old procedure you should not be able to create the venv1 in first place. In case you succeded and getting below error: _(venv1) @.** script]$ python3 ios-xr_log_collection_v1.py Traceback (most recent call last): File "ios-xr_log_collection_v1.py", line 14, in from netmiko import ConnectHandler File "/home/users/viksisod/script/venv1/lib/python3.6/site-packages/netmiko/ init.py", line 29, in check_python_version() # type: ignore File "/home/users/viksisod/script/venv1/lib/python3.6/site-packages/netmiko/ init*.py", line 26, in check_python_version raise ValueError(msg) ValueError:

Netmiko Version 4.1.2 requires Python Version 3.7 or higher. 🐍_

Please go ahead and uninstall the newer Netmiko version and install the required netmiko using below: script]$ pip uninstall netmiko script]$ pip install netmiko==3.4.0

HTH Vikram

— Reply to this email directly, view it on GitHub https://github.com/rakeshchhikara/IOS-XR_TAC-Log_Automation/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQU5OCWB6AKW6OTU3I5S5NTV2WOQTANCNFSM57NYHYDA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

Sincerely, Rakesh Chhikara CCIE R&S# 41320 Mob. +91- 7838-888890