cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8755
Views
29
Helpful
23
Replies

YDK-Py installation made super simple!

saalvare
Cisco Employee
Cisco Employee

Starting with release 0.5.4, YDK-PY is now part of the Python package index (PyPi). This means a dramatically simpler installation experience.  Instead of downloading/cloning the YDK-Py code, building source packages and installing them in a particular order, you can just use the pip utility to automate the installation.  Previously, a full installation of YDK-Py (YDK core package, plus XR/OpenConfig/IETF) could take 12 steps.  Now, you just need to issue:

$ pip install ydk-models-cisco-ios-xr

If you already have YDK-Py installed and want to upgrade:

$ pip install ydk-models-cisco-ios-xr --upgrade

That's it.  That simple!

The installation process takes care of pulling all Python dependencies and install them for you.  Take into account that Python packaging doesn't handle system dependencies.  That is, non-python libraries and packages required by YDK-Py or by Python packages that YDK-Py uses.  You still need to install those system dependencies the first time you use YDK-Py.  See our updated installation instructions in the YDK-Py documentation.

Let's get hacking!

23 Replies 23

Based on the error, it looks like libydk is missing.

As specified in the system requirements, can you please install libydk (https://github.com/CiscoDevNet/ydk-py#linux)?

$ wget https://devhub.cisco.com/artifactory/debian-ydk/0.6.0/libydk_0.6.0-1_amd64.deb

$ sudo gdebi libydk_0.6.0-1_amd64.deb

Hi

For Y.D.K 0.6.0:

$ sudo apt-get install gdebi-core python3-dev python-dev libtool-bin

$ wget https://devhub.cisco.com/artifactory/debian-ydk/0.6.0/libydk_0.6.0-1_amd64.deb

$ sudo gdebi libydk_0.6.0-1_amd64.deb

Then you can install it in two ways:

With pip (under viirtual environment)

pip install ydk-models-cisco-ios-xr

or

Manual

Clone the git repository GitHub - CiscoDevNet/ydk-py: Python SDK generated from YANG data models.

Then

*The core first...

$ cd core

core$ python setup.py sdist

core$ pip install dist/ydk*.gz

finally install XR, XE, ietf, etc

core$ cd ../cisco-ios-xr

cisco-ios-xr$ python setup.py sdist

cisco-ios-xr$ pip install dist/ydk*.gz

cisco-ios-xr$ cd ..

Regards.

balamani
Level 1
Level 1

Hi,

I am using vagrant box which has ydk 0.5.4.

If i run following command "vagrant box update", i get below output.

==> ydk-py-ubuntu: Checking for updates to 'ydk-py-ubuntu'

    ydk-py-ubuntu: Latest installed version: 0.5.4

    ydk-py-ubuntu: Version constraints:

    ydk-py-ubuntu: Provider: virtualbox

==> ydk-py-ubuntu: Box 'ydk-py-ubuntu' (v0.5.4) is running the latest version.

Please let me know whether ydk 0.6.0 is available for vagrant box or not. Also let me know if there is any other way to upgrading ydk to latest version.

Thanks in advance.

Regards,

Basavaraj

I believe, currently, the YDK vagrant box does not support YDK 0.6.0. But it should support it in the future.

Planning to update the vagrant sandbox by the end of the week.  Stay tuned.

sihart
Cisco Employee
Cisco Employee

Hi,

I am currently running Mac OS X (10.12.6) and am failing to install ydk 0.6.0

Xcode 9.0 and Homebrew are installed

When running the command at terminal

sudo installer -pkg libydk-0.6.1-Darwin.pkg -target /


I receive the following error message

installer: Error the package path specified was invalid: 'libydk-0.6.1-Darwin.pkg'.


I am running the command in the directory that libydk-0.6.1-Darwin.pkg resides in, so not sure why it is not picking up the pkg.  I have tried this on two Macs so far with the same error given.

Apologies. There was a typo in the README (ydk-py/README.rst at master · CiscoDevNet/ydk-py · GitHub). It has been corrected now. Can you now try the below?

$ curl -O https://devhub.cisco.com/artifactory/osx-ydk/0.6.1/libydk-0.6.1-Darwin.pkg

$ sudo installer -pkg libydk-0.6.1-Darwin.pkg -target /

Yes that worked.  Thanks