cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
201
Views
0
Helpful
7
Replies
Highlighted
Cisco Employee

installing ydk-models-cisco-ios-xr

hi, i tried to deploy YDK on Ubuntu 20.04 by following the documentation and the installation fails at some point.  Basically the GPRC and GNMI all succeed but when it comes to installing ydk-models-cisco-ios-xr this is where things break.  I finally installed the Docker image when i gave up and i was able to finish the install properly and to even run the YDK.

 

I have two questions:

1) Having installed YDK, how can i access it from any Python IDE so that I can start using import ydd.ietf etc. in my code?

2) why installing with such commands keep failing all the time "pip3 install ydk-models-cisco-ios-xr", even importing from the IDE like Pycharm also fails.

 

the attached file lists errors when attempting to issue the pip install command, please advise, thanks

7 REPLIES 7
Highlighted
Participant

Hello Mawaheb

The Ubuntu:focal is supported in YDK since version 0.8.5. It is not available on pypi.org and therefore must be installed from source. Please follow this simple procedure:

git clone https://github.com/ygorelik/ydk-gen.git
cd ydk-gen
./install_ydk.sh --core # this will install all the dependencies, and all YDK core components for python
source ~/venv/bin/activate # Python virtual environment was created automatically in previous command
pip install ydk-models-cisco-ios-xr

Regarding your questions:

1. Once YDK is installed, all its components will be available in PyCharm IDE. You just need properly set Python interpreter to one in the virtual environment: ~/venv/bon/python.

2. The installation error appeared due to luck of third party dependencies. That should be resolved during install_ydk.sh execution.

 

Yan Gorelik
YDK Solutions
Highlighted

Hi, and thanks for your help

 

Step-1: to clone git, worked fine no probs.

Step-2: ./install_ydk.sh -–core (this one had some issues), please see output below.  What do you recommend to fix it? 

Step-3: pip3 install ydk-models-cisco-ios-xr failed with error messages, see below

 

mkabbara@mkabbara-virtual-machine:~/ydk-gen$ ./install_ydk.sh --core

YDK installation options: language=py, core_package=yes, service_package=no, dependencies=yes

*** 26 كانون الثاني, 2021 EET 02:08:36 ص *** install_ydk.sh | Running OS type: Linux 

*** 26 كانون الثاني, 2021 EET 02:08:36 ص *** install_ydk.sh | OS info: DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=20.04

DISTRIB_CODENAME=focal

DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"

NAME="Ubuntu"

VERSION="20.04.1 LTS (Focal Fossa)"

ID=ubuntu

ID_LIKE=debian

PRETTY_NAME="Ubuntu 20.04.1 LTS"

VERSION_ID="20.04"

HOME_URL="https://www.ubuntu.com/"

SUPPORT_URL="https://help.ubuntu.com/"

BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"

PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"

VERSION_CODENAME=focal

UBUNTU_CODENAME=focal 

*** 26 كانون الثاني, 2021 EET 02:08:36 ص *** install_ydk.sh | YDKGEN_HOME is set to /home/mkabbara/ydk-gen 

*** 26 كانون الثاني, 2021 EET 02:08:36 ص *** install_ydk.sh | Running: /home/mkabbara/ydk-gen/test/dependencies_ubuntu.sh 

*** 26 كانون الثاني, 2021 EET 02:08:36 ص *** dependencies_ubuntu.sh | Installing dependencies 

Reading package lists... Done

E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)

E: Unable to lock directory /var/lib/apt/lists/

W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)

W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)

E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)

E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

[sudo] password for mkabbara: 

Reading package lists... Done

Building dependency tree       

Reading state information... Done

lsb-release is already the newest version (11.1.0ubuntu2).

The following packages were automatically installed and are no longer required:

  bridge-utils libfprint-2-tod1 ubuntu-fan

Use 'sudo apt autoremove' to remove them.

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

*** 26 كانون الثاني, 2021 EET 02:08:42 ص *** dependencies_ubuntu.sh | Running: sudo apt-get install -y --no-install-recommends apt-utils 

Reading package lists... Done

Building dependency tree       

Reading state information... Done

apt-utils is already the newest version (2.0.2ubuntu0.2).

The following packages were automatically installed and are no longer required:

  bridge-utils libfprint-2-tod1 ubuntu-fan

Use 'sudo apt autoremove' to remove them.

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

*** 26 كانون الثاني, 2021 EET 02:08:42 ص *** dependencies_ubuntu.sh | Running: sudo apt-get update -y 

Hit:1 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu focal InRelease                             

Hit:2 http://us.archive.ubuntu.com/ubuntu focal InRelease                                                 

Hit:3 https://linux.teamviewer.com/deb stable InRelease             

Hit:4 https://download.docker.com/linux/ubuntu focal InRelease

Get:5 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]

Get:6 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]

Get:7 http://us.archive.ubuntu.com/ubuntu focal-security InRelease [109 kB]

Ign:8 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata

Ign:9 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata

Ign:10 http://us.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata

Ign:11 http://us.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata

Ign:12 http://us.archive.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata

Ign:13 http://us.archive.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata                  

Get:8 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [263 kB]               

Err:8 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata                        

  File has unexpected size (264424 != 262900). Mirror sync in progress? [IP: 173.38.209.11 80]

  Hashes of expected file:

   - Filesize:262900 [weak]

   - SHA256:544ac833997f4d346bcfe908e7540c5d5618dd500154196d1ba76bb34e21623d

   - SHA1:7d35fbc9b0083da7833d3f15c8b08fb1c9d3fa78 [weak]

   - MD5Sum:7cd64b7e00e0b6f818e89b8d6355b930 [weak]

  Release file created at: Sat, 26 Dec 2020 11:04:47 +0000

Get:9 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [205 kB]           

Err:9 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata                    

  

Get:10 http://us.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [2,468 B]       

Err:10 http://us.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata                 

  

Get:11 http://us.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1,768 B]       

Err:11 http://us.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata                 

  Hash Sum mismatch

  Hashes of expected file:

   - Filesize:1768 [weak]

   - SHA256:3353e273626cd10165f65b9cf1936a689a8a0370dab010a65a57d13b1f27b68b

   - SHA1:bc0bb94cda77b966a02c23114b24d5431f83a916 [weak]

   - MD5Sum:77e356f483c62365906060c86157830a [weak]

  Hashes of received file:

   - SHA256:0da32f852c220941f3329376d5be9a21e25e2570fce92c409fef31ea0324083d

   - SHA1:bd892b50ecef369becb59d539ec0f999d4b0fee5 [weak]

   - MD5Sum:ad76fcc103e08d01fd9782cb6bde3740 [weak]

   - Filesize:1768 [weak]

  Last modification reported: Tue, 26 Jan 2021 05:18:49 +0000

  Release file created at: Sat, 26 Dec 2020 11:05:10 +0000

Get:12 http://us.archive.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [24.3 kB]            

Err:12 http://us.archive.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata                      

  File has unexpected size (24280 != 24284). Mirror sync in progress? [IP: 173.38.209.11 80]

  Hashes of expected file:

   - Filesize:24284 [weak]

   - SHA256:afb34713739721ac086d55707be7437f6a0048eb1eb92897307d062120787b20

   - SHA1:4f400488c272e9d2cf97744153589fb11d218751 [weak]

   - MD5Sum:4e738dd7d67973b0ee403720450b0634 [weak]

  Release file created at: Sat, 26 Dec 2020 11:04:35 +0000

Get:13 http://us.archive.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [56.5 kB]        

Err:13 http://us.archive.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata                  

  

Fetched 4,236 B in 14s (299 B/s)                                                                          

Reading package lists... Done

E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-updates/main/dep11/Components-amd64.yml.xz  File has unexpected size (264424 != 262900). Mirror sync in progress? [IP: 173.38.209.11 80]

   Hashes of expected file:

    - Filesize:262900 [weak]

    - SHA256:544ac833997f4d346bcfe908e7540c5d5618dd500154196d1ba76bb34e21623d

    - SHA1:7d35fbc9b0083da7833d3f15c8b08fb1c9d3fa78 [weak]

    - MD5Sum:7cd64b7e00e0b6f818e89b8d6355b930 [weak]

   Release file created at: Sat, 26 Dec 2020 11:04:47 +0000

E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-updates/universe/dep11/Components-amd64.yml.xz  

E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-updates/multiverse/dep11/Components-amd64.yml.xz  

E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-backports/universe/dep11/Components-amd64.yml.xz  Hash Sum mismatch

   Hashes of expected file:

    - Filesize:1768 [weak]

    - SHA256:3353e273626cd10165f65b9cf1936a689a8a0370dab010a65a57d13b1f27b68b

    - SHA1:bc0bb94cda77b966a02c23114b24d5431f83a916 [weak]

    - MD5Sum:77e356f483c62365906060c86157830a [weak]

   Hashes of received file:

    - SHA256:0da32f852c220941f3329376d5be9a21e25e2570fce92c409fef31ea0324083d

    - SHA1:bd892b50ecef369becb59d539ec0f999d4b0fee5 [weak]

    - MD5Sum:ad76fcc103e08d01fd9782cb6bde3740 [weak]

    - Filesize:1768 [weak]

   Last modification reported: Tue, 26 Jan 2021 05:18:49 +0000

   Release file created at: Sat, 26 Dec 2020 11:05:10 +0000

E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-security/main/dep11/Components-amd64.yml.xz  File has unexpected size (24280 != 24284). Mirror sync in progress? [IP: 173.38.209.11 80]

   Hashes of expected file:

    - Filesize:24284 [weak]

    - SHA256:afb34713739721ac086d55707be7437f6a0048eb1eb92897307d062120787b20

    - SHA1:4f400488c272e9d2cf97744153589fb11d218751 [weak]

    - MD5Sum:4e738dd7d67973b0ee403720450b0634 [weak]

   Release file created at: Sat, 26 Dec 2020 11:04:35 +0000

E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-security/universe/dep11/Components-amd64.yml.xz  

E: Some index files failed to download. They have been ignored, or old ones used instead.

*** 26 كانون الثاني, 2021 EET 02:08:59 ص *** dependencies_ubuntu.sh | Exiting 'sudo apt-get update -y' with status=100 

*** 26 كانون الثاني, 2021 EET 02:08:59 ص *** install_ydk.sh | Exiting '/home/mkabbara/ydk-gen/test/dependencies_ubuntu.sh' with status=100 

mkabbara@mkabbara-virtual-machine:~/ydk-gen$ 

 

 

mkabbara@mkabbara-virtual-machine:~/ydk-gen$ pip3 install ydk-models-cisco-ios-xr

Processing /home/mkabbara/.cache/pip/wheels/04/23/aa/41091487d5b6076e022bed350f346f405773ce764240f23743/ydk_models_cisco_ios_xr-6.6.3-py2.py3-none-any.whl

Collecting ydk>=0.8.4

  Using cached ydk-0.8.4.tar.gz (33 kB)

Processing /home/mkabbara/.cache/pip/wheels/54/d4/1c/369fb75a4946476712b52afca90060f64dc0f8b7936c4a1e61/ydk_models_ietf-0.1.5.post2-py2.py3-none-any.whl

Collecting pybind11>=2.1.1

  Using cached pybind11-2.6.1-py2.py3-none-any.whl (188 kB)

Building wheels for collected packages: ydk

  Building wheel for ydk (setup.py) ... error

  ERROR: Command errored out with exit status 1:

   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gdvv0y6z/ydk/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gdvv0y6z/ydk/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-000xxkvh

       cwd: /tmp/pip-install-gdvv0y6z/ydk/

  Complete output (110 lines):

  running bdist_wheel

  running build

  running build_py

  creating build

  creating build/lib.linux-x86_64-3.8

  creating build/lib.linux-x86_64-3.8/ydk

  copying ydk/exthook.py -> build/lib.linux-x86_64-3.8/ydk

  copying ydk/__init__.py -> build/lib.linux-x86_64-3.8/ydk

  creating build/lib.linux-x86_64-3.8/ydk/logging

  copying ydk/logging/__init__.py -> build/lib.linux-x86_64-3.8/ydk/logging

  creating build/lib.linux-x86_64-3.8/ydk/models

  copying ydk/models/__init__.py -> build/lib.linux-x86_64-3.8/ydk/models

  creating build/lib.linux-x86_64-3.8/ydk/providers

  copying ydk/providers/netconf_provider.py -> build/lib.linux-x86_64-3.8/ydk/providers

  copying ydk/providers/codec_provider.py -> build/lib.linux-x86_64-3.8/ydk/providers

  copying ydk/providers/__init__.py -> build/lib.linux-x86_64-3.8/ydk/providers

  creating build/lib.linux-x86_64-3.8/ydk/ext

  copying ydk/ext/__init__.py -> build/lib.linux-x86_64-3.8/ydk/ext

  creating build/lib.linux-x86_64-3.8/ydk/_core

  copying ydk/_core/_importer.py -> build/lib.linux-x86_64-3.8/ydk/_core

  copying ydk/_core/__init__.py -> build/lib.linux-x86_64-3.8/ydk/_core

  copying ydk/_core/_dm_meta_info.py -> build/lib.linux-x86_64-3.8/ydk/_core

  creating build/lib.linux-x86_64-3.8/ydk/entity_utils

  copying ydk/entity_utils/entity_utils.py -> build/lib.linux-x86_64-3.8/ydk/entity_utils

  copying ydk/entity_utils/__init__.py -> build/lib.linux-x86_64-3.8/ydk/entity_utils

  creating build/lib.linux-x86_64-3.8/ydk/services

  copying ydk/services/crud_service.py -> build/lib.linux-x86_64-3.8/ydk/services

  copying ydk/services/codec_service.py -> build/lib.linux-x86_64-3.8/ydk/services

  copying ydk/services/netconf_service.py -> build/lib.linux-x86_64-3.8/ydk/services

  copying ydk/services/executor_service.py -> build/lib.linux-x86_64-3.8/ydk/services

  copying ydk/services/__init__.py -> build/lib.linux-x86_64-3.8/ydk/services

  creating build/lib.linux-x86_64-3.8/ydk/path

  copying ydk/path/__init__.py -> build/lib.linux-x86_64-3.8/ydk/path

  creating build/lib.linux-x86_64-3.8/ydk/errors

  copying ydk/errors/error_handler.py -> build/lib.linux-x86_64-3.8/ydk/errors

  copying ydk/errors/__init__.py -> build/lib.linux-x86_64-3.8/ydk/errors

  creating build/lib.linux-x86_64-3.8/ydk/types

  copying ydk/types/py_types.py -> build/lib.linux-x86_64-3.8/ydk/types

  copying ydk/types/__init__.py -> build/lib.linux-x86_64-3.8/ydk/types

  creating build/lib.linux-x86_64-3.8/ydk/filters

  copying ydk/filters/__init__.py -> build/lib.linux-x86_64-3.8/ydk/filters

  creating build/lib.linux-x86_64-3.8/ydk/path/sessions

  copying ydk/path/sessions/netconf_session.py -> build/lib.linux-x86_64-3.8/ydk/path/sessions

  copying ydk/path/sessions/restconf_session.py -> build/lib.linux-x86_64-3.8/ydk/path/sessions

  copying ydk/path/sessions/__init__.py -> build/lib.linux-x86_64-3.8/ydk/path/sessions

  running build_ext

  WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.

  Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.

  To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.

  Collecting pybind11>=2.1.1

    Using cached pybind11-2.6.1-py2.py3-none-any.whl (188 kB)

  Installing collected packages: pybind11

    WARNING: The script pybind11-config is installed in '/home/mkabbara/.local/bin' which is not on PATH.

    Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

  Successfully installed pybind11-2.6.1

  -- The C compiler identification is GNU 9.3.0

  -- The CXX compiler identification is GNU 9.3.0

  -- Check for working C compiler: /usr/bin/cc

  -- Check for working C compiler: /usr/bin/cc -- works

  -- Detecting C compiler ABI info

  -- Detecting C compiler ABI info - done

  -- Detecting C compile features

  -- Detecting C compile features - done

  -- Check for working CXX compiler: /usr/bin/c++

  -- Check for working CXX compiler: /usr/bin/c++ -- works

  -- Detecting CXX compiler ABI info

  -- Detecting CXX compiler ABI info - done

  -- Detecting CXX compile features

  -- Detecting CXX compile features - done

  python version: 3.8

  -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found version "3.8.5")

  pybind11 include: /home/mkabbara/.local/lib/python3.8/site-packages/pybind11/include;/home/mkabbara/.local/lib/python3.8/site-packages/pybind11/include

  CMake Error: The following variables are used in this project, but they are set to NOTFOUND.

  Please set them or make sure they are set and tested correctly in the CMake files:

  ssh_threads_location

      linked by target "ydk_" in directory /tmp/pip-install-gdvv0y6z/ydk

  

  -- Configuring incomplete, errors occurred!

  See also "/tmp/pip-install-gdvv0y6z/ydk/build/temp.linux-x86_64-3.8/CMakeFiles/CMakeOutput.log".

  Traceback (most recent call last):

    File "<string>", line 1, in <module>

    File "/tmp/pip-install-gdvv0y6z/ydk/setup.py", line 111, in <module>

      setup(

    File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup

      return distutils.core.setup(**attrs)

    File "/usr/lib/python3.8/distutils/core.py", line 148, in setup

      dist.run_commands()

    File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands

      self.run_command(cmd)

    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command

      cmd_obj.run()

    File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 223, in run

      self.run_command('build')

    File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command

      self.distribution.run_command(command)

    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command

      cmd_obj.run()

    File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run

      self.run_command(cmd_name)

    File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command

      self.distribution.run_command(command)

    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command

      cmd_obj.run()

    File "/tmp/pip-install-gdvv0y6z/ydk/setup.py", line 68, in run

      self.build_extension(ext)

    File "/tmp/pip-install-gdvv0y6z/ydk/setup.py", line 100, in build_extension

      subprocess.check_call([cmake_executable, ext.sourcedir] + cmake_args, cwd=self.build_temp)

    File "/usr/lib/python3.8/subprocess.py", line 364, in check_call

      raise CalledProcessError(retcode, cmd)

  subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-gdvv0y6z/ydk', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-gdvv0y6z/ydk/build/lib.linux-x86_64-3.8', '-DPYBIND11_INCLUDE=/home/mkabbara/.local/lib/python3.8/site-packages/pybind11/include;/home/mkabbara/.local/lib/python3.8/site-packages/pybind11/include', '-DPYTHON_VERSION=3.8', '-DCMAKE_BUILD_TYPE=Release', '-DCOVERAGE=False']' returned non-zero exit status 1.

  ----------------------------------------

  ERROR: Failed building wheel for ydk

  Running setup.py clean for ydk

Failed to build ydk

Installing collected packages: pybind11, ydk, ydk-models-ietf, ydk-models-cisco-ios-xr

  WARNING: The script pybind11-config is installed in '/home/mkabbara/.local/bin' which is not on PATH.

  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

    Running setup.py install for ydk ... error

    ERROR: Command errored out with exit status 1:

     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gdvv0y6z/ydk/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gdvv0y6z/ydk/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-9j_t5vhp/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/mkabbara/.local/include/python3.8/ydk

         cwd: /tmp/pip-install-gdvv0y6z/ydk/

    Complete output (103 lines):

    running install

    running build

    running build_py

    creating build

    creating build/lib.linux-x86_64-3.8

    creating build/lib.linux-x86_64-3.8/ydk

    copying ydk/exthook.py -> build/lib.linux-x86_64-3.8/ydk

    copying ydk/__init__.py -> build/lib.linux-x86_64-3.8/ydk

    creating build/lib.linux-x86_64-3.8/ydk/logging

    copying ydk/logging/__init__.py -> build/lib.linux-x86_64-3.8/ydk/logging

    creating build/lib.linux-x86_64-3.8/ydk/models

    copying ydk/models/__init__.py -> build/lib.linux-x86_64-3.8/ydk/models

    creating build/lib.linux-x86_64-3.8/ydk/providers

    copying ydk/providers/netconf_provider.py -> build/lib.linux-x86_64-3.8/ydk/providers

    copying ydk/providers/codec_provider.py -> build/lib.linux-x86_64-3.8/ydk/providers

    copying ydk/providers/__init__.py -> build/lib.linux-x86_64-3.8/ydk/providers

    creating build/lib.linux-x86_64-3.8/ydk/ext

    copying ydk/ext/__init__.py -> build/lib.linux-x86_64-3.8/ydk/ext

    creating build/lib.linux-x86_64-3.8/ydk/_core

    copying ydk/_core/_importer.py -> build/lib.linux-x86_64-3.8/ydk/_core

    copying ydk/_core/__init__.py -> build/lib.linux-x86_64-3.8/ydk/_core

    copying ydk/_core/_dm_meta_info.py -> build/lib.linux-x86_64-3.8/ydk/_core

    creating build/lib.linux-x86_64-3.8/ydk/entity_utils

    copying ydk/entity_utils/entity_utils.py -> build/lib.linux-x86_64-3.8/ydk/entity_utils

    copying ydk/entity_utils/__init__.py -> build/lib.linux-x86_64-3.8/ydk/entity_utils

    creating build/lib.linux-x86_64-3.8/ydk/services

    copying ydk/services/crud_service.py -> build/lib.linux-x86_64-3.8/ydk/services

    copying ydk/services/codec_service.py -> build/lib.linux-x86_64-3.8/ydk/services

    copying ydk/services/netconf_service.py -> build/lib.linux-x86_64-3.8/ydk/services

    copying ydk/services/executor_service.py -> build/lib.linux-x86_64-3.8/ydk/services

    copying ydk/services/__init__.py -> build/lib.linux-x86_64-3.8/ydk/services

    creating build/lib.linux-x86_64-3.8/ydk/path

    copying ydk/path/__init__.py -> build/lib.linux-x86_64-3.8/ydk/path

    creating build/lib.linux-x86_64-3.8/ydk/errors

    copying ydk/errors/error_handler.py -> build/lib.linux-x86_64-3.8/ydk/errors

    copying ydk/errors/__init__.py -> build/lib.linux-x86_64-3.8/ydk/errors

    creating build/lib.linux-x86_64-3.8/ydk/types

    copying ydk/types/py_types.py -> build/lib.linux-x86_64-3.8/ydk/types

    copying ydk/types/__init__.py -> build/lib.linux-x86_64-3.8/ydk/types

    creating build/lib.linux-x86_64-3.8/ydk/filters

    copying ydk/filters/__init__.py -> build/lib.linux-x86_64-3.8/ydk/filters

    creating build/lib.linux-x86_64-3.8/ydk/path/sessions

    copying ydk/path/sessions/netconf_session.py -> build/lib.linux-x86_64-3.8/ydk/path/sessions

    copying ydk/path/sessions/restconf_session.py -> build/lib.linux-x86_64-3.8/ydk/path/sessions

    copying ydk/path/sessions/__init__.py -> build/lib.linux-x86_64-3.8/ydk/path/sessions

    running build_ext

    -- The C compiler identification is GNU 9.3.0

    -- The CXX compiler identification is GNU 9.3.0

    -- Check for working C compiler: /usr/bin/cc

    -- Check for working C compiler: /usr/bin/cc -- works

    -- Detecting C compiler ABI info

    -- Detecting C compiler ABI info - done

    -- Detecting C compile features

    -- Detecting C compile features - done

    -- Check for working CXX compiler: /usr/bin/c++

    -- Check for working CXX compiler: /usr/bin/c++ -- works

    -- Detecting CXX compiler ABI info

    -- Detecting CXX compiler ABI info - done

    -- Detecting CXX compile features

    -- Detecting CXX compile features - done

    python version: 3.8

    -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found version "3.8.5")

    pybind11 include: /home/mkabbara/.local/lib/python3.8/site-packages/pybind11/include;/home/mkabbara/.local/lib/python3.8/site-packages/pybind11/include

    CMake Error: The following variables are used in this project, but they are set to NOTFOUND.

    Please set them or make sure they are set and tested correctly in the CMake files:

    ssh_threads_location

        linked by target "ydk_" in directory /tmp/pip-install-gdvv0y6z/ydk

    

    -- Configuring incomplete, errors occurred!

    See also "/tmp/pip-install-gdvv0y6z/ydk/build/temp.linux-x86_64-3.8/CMakeFiles/CMakeOutput.log".

    Traceback (most recent call last):

      File "<string>", line 1, in <module>

      File "/tmp/pip-install-gdvv0y6z/ydk/setup.py", line 111, in <module>

        setup(

      File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup

        return distutils.core.setup(**attrs)

      File "/usr/lib/python3.8/distutils/core.py", line 148, in setup

        dist.run_commands()

      File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands

        self.run_command(cmd)

      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command

        cmd_obj.run()

      File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run

        return orig.install.run(self)

      File "/usr/lib/python3.8/distutils/command/install.py", line 589, in run

        self.run_command('build')

      File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command

        self.distribution.run_command(command)

      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command

        cmd_obj.run()

      File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run

        self.run_command(cmd_name)

      File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command

        self.distribution.run_command(command)

      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command

        cmd_obj.run()

      File "/tmp/pip-install-gdvv0y6z/ydk/setup.py", line 68, in run

        self.build_extension(ext)

      File "/tmp/pip-install-gdvv0y6z/ydk/setup.py", line 100, in build_extension

        subprocess.check_call([cmake_executable, ext.sourcedir] + cmake_args, cwd=self.build_temp)

      File "/usr/lib/python3.8/subprocess.py", line 364, in check_call

        raise CalledProcessError(retcode, cmd)

    subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-gdvv0y6z/ydk', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-gdvv0y6z/ydk/build/lib.linux-x86_64-3.8', '-DPYBIND11_INCLUDE=/home/mkabbara/.local/lib/python3.8/site-packages/pybind11/include;/home/mkabbara/.local/lib/python3.8/site-packages/pybind11/include', '-DPYTHON_VERSION=3.8', '-DCMAKE_BUILD_TYPE=Release', '-DCOVERAGE=False']' returned non-zero exit status 1.

    ----------------------------------------

ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gdvv0y6z/ydk/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gdvv0y6z/ydk/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-9j_t5vhp/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/mkabbara/.local/include/python3.8/ydk Check the logs for full command output.

mkabbara@mkabbara-virtual-machine:~/ydk-gen$ 

 

Highlighted

Hi Mawaheb

On your platform the YDK installation script fails due to some issues with Ubuntu mirrors:

*** 26 كانون الثاني, 2021 EET 02:08:59 ص *** dependencies_ubuntu.sh | Exiting 'sudo apt-get update -y' with status=100 
*** 26 كانون الثاني, 2021 EET 02:08:59 ص *** install_ydk.sh | Exiting '/home/mkabbara/ydk-gen/test/dependencies_ubuntu.sh' with status=100 

Try to run from your console 'sudo apt-get update -y'. Make sure this command got executed properly, with no errors. Then repeat the 'install_sh --core'.

Note, the script creates and installs YDK in Python virtual environment, not the platform installation. Therefore you must activate that virtual environment when you develop and run YDK based application including any/all 'pip' operation command.

For more information please check the YDK documentation on the GitHub.

Yan Gorelik
YDK Solutions
Highlighted

Hi, the update is giving me an error


(venv) mkabbara@mkabbara-virtual-machine:~$ sudo apt-get update -y

[sudo] password for mkabbara:

Hit:1 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu focal InRelease

Hit:2 http://us.archive.ubuntu.com/ubuntu focal InRelease

Hit:3 https://download.docker.com/linux/ubuntu focal InRelease

Hit:4 https://linux.teamviewer.com/deb stable InRelease

Get:5 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]

Get:6 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]

Get:7 http://us.archive.ubuntu.com/ubuntu focal-security InRelease [109 kB]

Ign:8 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata

Ign:9 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata

Ign:10 http://us.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata

Ign:11 http://us.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata

Get:8 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [263 kB]

Err:8 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata

File has unexpected size (264232 != 262900). Mirror sync in progress? [IP: 173.38.209.8 80]

Hashes of expected file:

- Filesize:262900 [weak]

- SHA256:544ac833997f4d346bcfe908e7540c5d5618dd500154196d1ba76bb34e21623d

- SHA1:7d35fbc9b0083da7833d3f15c8b08fb1c9d3fa78 [weak]

- MD5Sum:7cd64b7e00e0b6f818e89b8d6355b930 [weak]

Release file created at: Sat, 26 Dec 2020 11:04:47 +0000

Ign:12 http://us.archive.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata

Ign:13 http://us.archive.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata

Get:9 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [205 kB]

Err:9 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata



Get:10 http://us.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [2,468 B]

Err:10 http://us.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata



Get:11 http://us.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1,768 B]

Err:11 http://us.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata

Hash Sum mismatch

Hashes of expected file:

- Filesize:1768 [weak]

- SHA256:3353e273626cd10165f65b9cf1936a689a8a0370dab010a65a57d13b1f27b68b

- SHA1:bc0bb94cda77b966a02c23114b24d5431f83a916 [weak]

- MD5Sum:77e356f483c62365906060c86157830a [weak]

Hashes of received file:

- SHA256:f28068686735b7b40d957a664b1a784bbbd9e43cf9b6d87253ebc2a9527c0c96

- SHA1:7376fd5a9910ee191db730da61f07cd05dc1ece4 [weak]

- MD5Sum:5381679c1897f82762a294544c1dbc28 [weak]

- Filesize:1768 [weak]

Last modification reported: Tue, 26 Jan 2021 13:19:24 +0000

Release file created at: Sat, 26 Dec 2020 11:05:10 +0000

Get:12 http://us.archive.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [24.3 kB]

Err:12 http://us.archive.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata

File has unexpected size (24268 != 24284). Mirror sync in progress? [IP: 173.38.209.8 80]

Hashes of expected file:

- Filesize:24284 [weak]

- SHA256:afb34713739721ac086d55707be7437f6a0048eb1eb92897307d062120787b20

- SHA1:4f400488c272e9d2cf97744153589fb11d218751 [weak]

- MD5Sum:4e738dd7d67973b0ee403720450b0634 [weak]

Release file created at: Sat, 26 Dec 2020 11:04:35 +0000

Get:13 http://us.archive.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [56.5 kB]

Err:13 http://us.archive.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata



Fetched 4,236 B in 14s (294 B/s)

Reading package lists... Done

E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-updates/main/dep11/Components-amd64.yml.xz File has unexpected size (264232 != 262900). Mirror sync in progress? [IP: 173.38.209.8 80]

Hashes of expected file:

- Filesize:262900 [weak]

- SHA256:544ac833997f4d346bcfe908e7540c5d5618dd500154196d1ba76bb34e21623d

- SHA1:7d35fbc9b0083da7833d3f15c8b08fb1c9d3fa78 [weak]

- MD5Sum:7cd64b7e00e0b6f818e89b8d6355b930 [weak]

Release file created at: Sat, 26 Dec 2020 11:04:47 +0000

E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-updates/universe/dep11/Components-amd64.yml.xz

E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-updates/multiverse/dep11/Components-amd64.yml.xz

E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-backports/universe/dep11/Components-amd64.yml.xz Hash Sum mismatch

Hashes of expected file:

- Filesize:1768 [weak]

- SHA256:3353e273626cd10165f65b9cf1936a689a8a0370dab010a65a57d13b1f27b68b

- SHA1:bc0bb94cda77b966a02c23114b24d5431f83a916 [weak]

- MD5Sum:77e356f483c62365906060c86157830a [weak]

Hashes of received file:

- SHA256:f28068686735b7b40d957a664b1a784bbbd9e43cf9b6d87253ebc2a9527c0c96

- SHA1:7376fd5a9910ee191db730da61f07cd05dc1ece4 [weak]

- MD5Sum:5381679c1897f82762a294544c1dbc28 [weak]

- Filesize:1768 [weak]

Last modification reported: Tue, 26 Jan 2021 13:19:24 +0000

Release file created at: Sat, 26 Dec 2020 11:05:10 +0000

E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-security/main/dep11/Components-amd64.yml.xz File has unexpected size (24268 != 24284). Mirror sync in progress? [IP: 173.38.209.8 80]

Hashes of expected file:

- Filesize:24284 [weak]

- SHA256:afb34713739721ac086d55707be7437f6a0048eb1eb92897307d062120787b20

- SHA1:4f400488c272e9d2cf97744153589fb11d218751 [weak]

- MD5Sum:4e738dd7d67973b0ee403720450b0634 [weak]

Release file created at: Sat, 26 Dec 2020 11:04:35 +0000

E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-security/universe/dep11/Components-amd64.yml.xz

E: Some index files failed to download. They have been ignored, or old ones used instead.

Highlighted

Hi Mawaheb

You need to find a way to fix this issue, if you want to continue development of this platform. As an alternative you can switch to a different platform, for example Ubuntu:bionic (18.04LTS), which was supported by YDK for a long time.

Yan Gorelik
YDK Solutions
Highlighted

Hi Yan

Actually this is what I did … I switched to Centos 7, it is much more reliable, stable and less error prone.
I managed to install it yesterday and I am fine and I would advise anyone reading this post to use Centos instead of Ubuntu for less headache and for a smoother install.

What we need to do, however; is to simplify the installation procedure because even on Centos it quite a complex install with too many steps to execute. We should aim for a two step procedure only, that is to clone the git and to run an installation file and that’s it, I hope we can do this soon and to document it on github and DevNet.
Highlighted

That simplified installation procedure is already offered in YDK-0.8.5. See the details here.

Yan Gorelik
YDK Solutions
Content for Community-Ad