cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4775
Views
1
Helpful
16
Replies

Installation problems ydk-gen

Rob85
Level 1
Level 1

I'm trying to install this package but I receive an error.

I've created a virtual env for this:

(py2) rob@ubuntu:ydk-gen$ pip list

alabaster (0.7.10)

Babel (2.4.0)

docutils (0.14)

gitdb (0.6.4)

GitPython (1.0.1)

imagesize (0.7.1)

Jinja2 (2.9.6)

MarkupSafe (1.0)

pip (9.0.1)

pyang (1.6)

Pygments (2.2.0)

pytz (2017.2)

rstr (2.2.6)

setuptools (36.2.7)

six (1.10.0)

smmap (0.9.0)

snowballstemmer (1.2.1)

Sphinx (1.4a1)

sphinx-rtd-theme (0.1.9)

wheel (0.29.0)

I can generate the CORE with /generate.py --python --core


But when I want to install it, it fails:


(py2) rob@ubuntu:ydk-gen$ pip install gen-api/python/ydk/dist/ydk*.tar.gz

Processing ./gen-api/python/ydk/dist/ydk-0.6.0.tar.gz

Collecting pybind11>=2.1.1 (from ydk==0.6.0)

  Using cached pybind11-2.1.1-py2.py3-none-any.whl

Building wheels for collected packages: ydk

[b]  Running setup.py bdist_wheel for ydk ... error[/b]

  Complete output from command /home/rob/.virtualenvs/py2/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-W4OeBF-build/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/tmpWKtY0Ypip-wheel- --python-tag cp27:

  running bdist_wheel

  running build

  running build_py

  creating build

  creating build/lib.linux-x86_64-2.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  running build_ext

  Collecting pybind11>=2.1.1

    Using cached pybind11-2.1.1-py2.py3-none-any.whl

  Installing collected packages: pybind11

  Successfully installed pybind11-2.1.1

  -- The C compiler identification is GNU 5.4.0

  -- The CXX compiler identification is GNU 5.4.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 library: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so

  python include: /usr/include/python2.7

  pybind11 include: /home/rob/.virtualenvs/py2/include/site/python2.7;/home/rob/.virtualenvs/py2/include/site/python2.7

  -- Configuring done

  -- Generating done

  -- Build files have been written to: /tmp/pip-W4OeBF-build/build/temp.linux-x86_64-2.7

  Scanning dependencies of target ydk_

  [ 50%] Building CXX object CMakeFiles/ydk_.dir/python.cpp.o

  /tmp/pip-W4OeBF-build/python.cpp:22:35: fatal error: ydk/restconf_client.hpp: No such file or directory

  compilation terminated.

  CMakeFiles/ydk_.dir/build.make:62: recipe for target 'CMakeFiles/ydk_.dir/python.cpp.o' failed

  make[2]: *** [CMakeFiles/ydk_.dir/python.cpp.o] Error 1

  CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ydk_.dir/all' failed

  make[1]: *** [CMakeFiles/ydk_.dir/all] Error 2

  Makefile:83: recipe for target 'all' failed

  make: *** [all] Error 2

  Traceback (most recent call last):

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

    File "/tmp/pip-W4OeBF-build/setup.py", line 157, in <module>

      zip_safe=False,

    File "/usr/lib/python2.7/distutils/core.py", line 151, in setup

      dist.run_commands()

    File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands

      self.run_command(cmd)

    File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

      cmd_obj.run()

    File "/home/rob/.virtualenvs/py2/local/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 179, in run

      self.run_command('build')

    File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command

      self.distribution.run_command(command)

    File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

      cmd_obj.run()

    File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run

      self.run_command(cmd_name)

    File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command

      self.distribution.run_command(command)

    File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

      cmd_obj.run()

    File "/tmp/pip-W4OeBF-build/setup.py", line 69, in run

      self.build_extension(ext)

    File "/tmp/pip-W4OeBF-build/setup.py", line 94, in build_extension

      subprocess.check_call(['cmake', '--build', '.'], cwd=self.build_temp)

    File "/usr/lib/python2.7/subprocess.py", line 541, in check_call

      raise CalledProcessError(retcode, cmd)

  subprocess.CalledProcessError: Command '['cmake', '--build', '.']' returned non-zero exit status 2

 

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

  Failed building wheel for ydk

  Running setup.py clean for ydk

Failed to build ydk

Installing collected packages: pybind11, ydk

  Running setup.py install for ydk ... error

    Complete output from command /home/rob/.virtualenvs/py2/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-W4OeBF-build/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-jD4xpB-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/rob/.virtualenvs/py2/include/site/python2.7/ydk:

    running install

    running build

    running build_py

    creating build

    creating build/lib.linux-x86_64-2.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    running build_ext

    -- The C compiler identification is GNU 5.4.0

    -- The CXX compiler identification is GNU 5.4.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 library: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so

    python include: /usr/include/python2.7

    pybind11 include: /home/rob/.virtualenvs/py2/include/site/python2.7;/home/rob/.virtualenvs/py2/include/site/python2.7

    -- Configuring done

    -- Generating done

    -- Build files have been written to: /tmp/pip-W4OeBF-build/build/temp.linux-x86_64-2.7

    Scanning dependencies of target ydk_

    [ 50%] Building CXX object CMakeFiles/ydk_.dir/python.cpp.o

    /tmp/pip-W4OeBF-build/python.cpp:22:35: fatal error: ydk/restconf_client.hpp: No such file or directory

    compilation terminated.

    CMakeFiles/ydk_.dir/build.make:62: recipe for target 'CMakeFiles/ydk_.dir/python.cpp.o' failed

    make[2]: *** [CMakeFiles/ydk_.dir/python.cpp.o] Error 1

    CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ydk_.dir/all' failed

    make[1]: *** [CMakeFiles/ydk_.dir/all] Error 2

    Makefile:83: recipe for target 'all' failed

    make: *** [all] Error 2

    Traceback (most recent call last):

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

      File "/tmp/pip-W4OeBF-build/setup.py", line 157, in <module>

        zip_safe=False,

      File "/usr/lib/python2.7/distutils/core.py", line 151, in setup

        dist.run_commands()

      File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands

        self.run_command(cmd)

      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

        cmd_obj.run()

      File "/home/rob/.virtualenvs/py2/local/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run

        return orig.install.run(self)

      File "/usr/lib/python2.7/distutils/command/install.py", line 601, in run

        self.run_command('build')

      File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command

        self.distribution.run_command(command)

      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

        cmd_obj.run()

      File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run

        self.run_command(cmd_name)

      File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command

        self.distribution.run_command(command)

      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

        cmd_obj.run()

      File "/tmp/pip-W4OeBF-build/setup.py", line 69, in run

        self.build_extension(ext)

      File "/tmp/pip-W4OeBF-build/setup.py", line 94, in build_extension

        subprocess.check_call(['cmake', '--build', '.'], cwd=self.build_temp)

      File "/usr/lib/python2.7/subprocess.py", line 541, in check_call

        raise CalledProcessError(retcode, cmd)

    subprocess.CalledProcessError: Command '['cmake', '--build', '.']' returned non-zero exit status 2

   

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

[b]Command "/home/rob/.virtualenvs/py2/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-W4OeBF-build/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-jD4xpB-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/rob/.virtualenvs/py2/include/site/python2.7/ydk" failed with error code 1 in /tmp/pip-W4OeBF-build/[/b]

1 Accepted Solution

Accepted Solutions

The other option could be if you are trying to build from source off the latest master, you cannot use the prebuilt binary (libydk) to satisfy the system dependency. You'd need to first build libydk from source and install it, then install the python core.

./generate.py --cpp --core

cd gen-api/cpp/ydk/build && make && sudo make install

cd -

./generate.py --python --core

View solution in original post

16 Replies 16

abhirame
Cisco Employee
Cisco Employee

Have you installed the system requirements?

GitHub - CiscoDevNet/ydk-gen: Generate model-driven APIs from YANG models

Thanks,

The other option could be if you are trying to build from source off the latest master, you cannot use the prebuilt binary (libydk) to satisfy the system dependency. You'd need to first build libydk from source and install it, then install the python core.

./generate.py --cpp --core

cd gen-api/cpp/ydk/build && make && sudo make install

cd -

./generate.py --python --core

Thank you for your suggestions.

In order to install it, I had to install cmake v3.8. Also I had to change the generate.py file so it uses clang++-3.8 and clang-3.8.

Afterwards I managed to run your code succesfully.

Then I configured this: ./generate.py --python --bundle profiles/bundles/cisco-ios-xe_16_5_1.json -v

It worked, but on the last line I saw:

Parsing file /home/test/ydk-gen//gen-api/.cache/models/cisco_ios_xe@16.5.1/CISCO-IPSEC-MIB.yang. Module name: CISCO-IPSEC-MIB. Revision: None

Parsing file /home/test/ydk-gen//gen-api/.cache/models/cisco_ios_xe@16.5.1/MPLS-LDP-STD-MIB.yang. Module name: MPLS-LDP-STD-MIB. Revision: None

Parsing file /home/test/ydk-gen//gen-api/.cache/models/cisco_ios_xe@16.5.1/Cisco-IOS-XE-wccp.yang. Module name: Cisco-IOS-XE-wccp. Revision: None

Parsing file /home/test/ydk-gen//gen-api/.cache/models/cisco_ios_xe@16.5.1/MPLS-TC-STD-MIB.yang. Module name: MPLS-TC-STD-MIB. Revision: None

Parsing file /home/test/ydk-gen//gen-api/.cache/models/cisco_ios_xe@16.5.1/CISCO-CONTEXT-MAPPING-MIB.yang. Module name: CISCO-CONTEXT-MAPPING-MIB. Revision: None

Parsing file /home/test/ydk-gen//gen-api/.cache/models/cisco_ios_xe@16.5.1/CISCO-SESS-BORDER-CTRLR-STATS-MIB.yang. Module name: CISCO-SESS-BORDER-CTRLR-STATS-MIB. Revision: None

Killed

I don't know if Killed is a good thing?

But now, when I want to install ydk-0.6.0.tar.gz , I get the same error.

(py2) test@ubuntu:~/ydk-gen/gen-api/python/ydk/dist$ pip install ydk-0.6.0.tar.gz

Processing ./ydk-0.6.0.tar.gz

Requirement already satisfied: pybind11>=2.1.1 in /home/test/.virtualenvs/py2/lib/python2.7/site-packages (from ydk==0.6.0)

Building wheels for collected packages: ydk

  Running setup.py bdist_wheel for ydk ... error

  Complete output from command /home/test/.virtualenvs/py2/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-qfogy6-build/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/tmplGl84wpip-wheel- --python-tag cp27:

  running bdist_wheel

  running build

  running build_py

  creating build

  creating build/lib.linux-x86_64-2.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  running build_ext

  -- The C compiler identification is GNU 5.4.0

  -- The CXX compiler identification is GNU 5.4.0

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

  -- Check for working C compiler: /usr/bin/gcc -- 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 library: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so

  python include: /usr/include/python2.7

  pybind11 include: /home/test/.virtualenvs/py2/include/site/python2.7;/home/test/.virtualenvs/py2/include/site/python2.7

  -- Configuring done

  -- Generating done

  -- Build files have been written to: /tmp/pip-qfogy6-build/build/temp.linux-x86_64-2.7

  Scanning dependencies of target ydk_

  [ 50%] Building CXX object CMakeFiles/ydk_.dir/python.cpp.o

  /tmp/pip-qfogy6-build/python.cpp:600:135: warning: unused parameter ‘port’ [-Wunused-parameter]

              [](ydk::NetconfServiceProvider &nc_provider, const string& address, const string& username, const string& password, void* port, const string& protocol, bool on_demand, bool common_cache) {

                                                                                                                                        ^

  c++: internal compiler error: Killed (program cc1plus)

  Please submit a full bug report,

  with preprocessed source if appropriate.

  See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.

  CMakeFiles/ydk_.dir/build.make:62: recipe for target 'CMakeFiles/ydk_.dir/python.cpp.o' failed

  make[2]: *** [CMakeFiles/ydk_.dir/python.cpp.o] Error 4

  CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ydk_.dir/all' failed

  make[1]: *** [CMakeFiles/ydk_.dir/all] Error 2

  Makefile:83: recipe for target 'all' failed

  make: *** [all] Error 2

  Traceback (most recent call last):

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

    File "/tmp/pip-qfogy6-build/setup.py", line 157, in <module>

      zip_safe=False,

    File "/usr/lib/python2.7/distutils/core.py", line 151, in setup

      dist.run_commands()

    File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands

      self.run_command(cmd)

    File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

      cmd_obj.run()

    File "/home/test/.virtualenvs/py2/local/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 179, in run

      self.run_command('build')

    File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command

      self.distribution.run_command(command)

    File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

      cmd_obj.run()

    File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run

      self.run_command(cmd_name)

    File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command

      self.distribution.run_command(command)

    File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

      cmd_obj.run()

    File "/tmp/pip-qfogy6-build/setup.py", line 69, in run

      self.build_extension(ext)

    File "/tmp/pip-qfogy6-build/setup.py", line 94, in build_extension

      subprocess.check_call(['cmake', '--build', '.'], cwd=self.build_temp)

    File "/usr/lib/python2.7/subprocess.py", line 541, in check_call

      raise CalledProcessError(retcode, cmd)

  subprocess.CalledProcessError: Command '['cmake', '--build', '.']' returned non-zero exit status 2

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

  Failed building wheel for ydk

  Running setup.py clean for ydk

Failed to build ydk

Installing collected packages: ydk

  Running setup.py install for ydk ... error

    Complete output from command /home/test/.virtualenvs/py2/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-qfogy6-build/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-aONghA-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/test/.virtualenvs/py2/include/site/python2.7/ydk:

    running install

    running build

    running build_py

    creating build

    creating build/lib.linux-x86_64-2.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    running build_ext

    -- The C compiler identification is GNU 5.4.0

    -- The CXX compiler identification is GNU 5.4.0

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

    -- Check for working C compiler: /usr/bin/gcc -- 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 library: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so

    python include: /usr/include/python2.7

    pybind11 include: /home/test/.virtualenvs/py2/include/site/python2.7;/home/test/.virtualenvs/py2/include/site/python2.7

    -- Configuring done

    -- Generating done

    -- Build files have been written to: /tmp/pip-qfogy6-build/build/temp.linux-x86_64-2.7

    Scanning dependencies of target ydk_

    [ 50%] Building CXX object CMakeFiles/ydk_.dir/python.cpp.o

    /tmp/pip-qfogy6-build/python.cpp:600:135: warning: unused parameter ‘port’ [-Wunused-parameter]

                [](ydk::NetconfServiceProvider &nc_provider, const string& address, const string& username, const string& password, void* port, const string& protocol, bool on_demand, bool common_cache) {

                                                                                                                                          ^

    c++: internal compiler error: Killed (program cc1plus)

    Please submit a full bug report,

    with preprocessed source if appropriate.

    See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.

    CMakeFiles/ydk_.dir/build.make:62: recipe for target 'CMakeFiles/ydk_.dir/python.cpp.o' failed

    make[2]: *** [CMakeFiles/ydk_.dir/python.cpp.o] Error 4

    CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ydk_.dir/all' failed

    make[1]: *** [CMakeFiles/ydk_.dir/all] Error 2

    Makefile:83: recipe for target 'all' failed

    make: *** [all] Error 2

    Traceback (most recent call last):

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

      File "/tmp/pip-qfogy6-build/setup.py", line 157, in <module>

        zip_safe=False,

      File "/usr/lib/python2.7/distutils/core.py", line 151, in setup

        dist.run_commands()

      File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands

        self.run_command(cmd)

      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

        cmd_obj.run()

      File "/home/test/.virtualenvs/py2/local/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run

        return orig.install.run(self)

      File "/usr/lib/python2.7/distutils/command/install.py", line 601, in run

        self.run_command('build')

      File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command

        self.distribution.run_command(command)

      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

        cmd_obj.run()

      File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run

        self.run_command(cmd_name)

      File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command

        self.distribution.run_command(command)

      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

        cmd_obj.run()

      File "/tmp/pip-qfogy6-build/setup.py", line 69, in run

        self.build_extension(ext)

      File "/tmp/pip-qfogy6-build/setup.py", line 94, in build_extension

        subprocess.check_call(['cmake', '--build', '.'], cwd=self.build_temp)

      File "/usr/lib/python2.7/subprocess.py", line 541, in check_call

        raise CalledProcessError(retcode, cmd)

    subprocess.CalledProcessError: Command '['cmake', '--build', '.']' returned non-zero exit status 2

 

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

Command "/home/test/.virtualenvs/py2/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-qfogy6-build/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-aONghA-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/test/.virtualenvs/py2/include/site/python2.7/ydk" failed with error code 1 in /tmp/pip-qfogy6-build/



I just did run v0.55 and it worked without any problems.

c++: internal compiler error: Killed (program cc1plus)

    Please submit a full bug report,

    with preprocessed source if appropriate.

I have come across this error previously if the compiler runs out of memory for example when compiling extremely large files. I'm not sure why you are seeing this.

Is there a specific reason you are using the generator tool (ydk-gen) to install YDK?

If not, can you try the quick install of prebuilt ydk-py package as documented here?

Yes I think you're right. My knowledge is growing

Chicken and the egg problem.

But now I managed to get everything up and running

Thanks

Glad it worked!

test1239
Cisco Employee
Cisco Employee

I am getting below error while installing ydk

    pybind11 include: /root/nacm/nacm_env/include/site/python3.4;/root/nacm/nacm_env/include/site/python3.4

    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:

    curl_location

        linked by target "ydk_" in directory /tmp/pip-build-kp_4zvyy/ydk

    xml2_location

        linked by target "ydk_" in directory /tmp/pip-build-kp_4zvyy/ydk

    xslt_location

        linked by target "ydk_" in directory /tmp/pip-build-kp_4zvyy/ydk

    ydk_location

        linked by target "ydk_" in directory /tmp/pip-build-kp_4zvyy/ydk

   

    -- Configuring incomplete, errors occurred!

    See also "/tmp/pip-build-kp_4zvyy/ydk/build/temp.linux-x86_64-3.4/CMakeFiles/CMakeOutput.log".

    Traceback (most recent call last):

Can you provide some details about your OS? Are you following the instructions here to install the system requirements?

Thanks,

we are using CentOS Linux release 7.3.1611 (Core) .

We installed all packages mentioned  in that document.

[root@bgl-netconf ~]# yum install epel-release libssh-devel gcc-c++

Loaded plugins: fastestmirror, langpacks, priorities

Loading mirror speeds from cached hostfile

* base: mirror.dhakacom.com

* epel: epel.scopesky.iq

* extras: mirror.dhakacom.com

* updates: mirror.dhakacom.com

Package epel-release-7-10.noarch already installed and latest version

Package libssh-devel-0.7.1-2.el7.x86_64 already installed and latest version

Package gcc-c++-4.8.5-11.el7.x86_64 already installed and latest version

[root@bgl-netconf ~]# yum install https://devhub.cisco.com/artifactory/rpm-ydk/0.6.0/libydk-0.6.0-1.x86_64.rpm

Loaded plugins: fastestmirror, langpacks, priorities

libydk-0.6.0-1.x86_64.rpm                                                                                                                                                     | 1.0 MB  00:00:07    

Examining /var/tmp/yum-root-zPki5O/libydk-0.6.0-1.x86_64.rpm: libydk-0.6.0-1.x86_64

/var/tmp/yum-root-zPki5O/libydk-0.6.0-1.x86_64.rpm: does not update installed package.

Then after we got below error.

(cafy_env) [skopperl@bgl-netconf ~]$ pip install ydk==0.6.0

Collecting ydk==0.6.0

  Using cached ydk-0.6.0.tar.gz

Requirement already satisfied: pybind11>=2.1.1 in ./cafy_env/lib/python3.6/site-packages (from ydk==0.6.0)

Installing collected packages: ydk

  Found existing installation: ydk 0.5.5

    Uninstalling ydk-0.5.5:

      Successfully uninstalled ydk-0.5.5

  Running setup.py install for ydk ... error

    Complete output from command /users/skopperl/cafy_env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-uotkxcx1/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-1ib6x8ws-record/install-record.txt --single-version-externally-managed --compile --install-headers /users/skopperl/cafy_env/include/site/python3.6/ydk:

    /users/skopperl/cafy_env/lib/python3.6/site-packages/setuptools/version.py:1: UserWarning: Module ydk was already imported from None, but /tmp/pip-build-uotkxcx1/ydk is being added to sys.path

      import pkg_resources

    running install

    running build

    running build_py

    creating build

    creating build/lib.linux-x86_64-3.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    running build_ext

    -- The C compiler identification is GNU 4.8.5

    -- The CXX compiler identification is GNU 4.8.5

    -- 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 library: /usr/local/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a

    python include: /usr/local/include/python3.6m

    pybind11 include: /users/skopperl/cafy_env/include/site/python3.6;/users/skopperl/cafy_env/include/site/python3.6

    -- Configuring done

    -- Generating done

    -- Build files have been written to: /tmp/pip-build-uotkxcx1/ydk/build/temp.linux-x86_64-3.6

    Scanning dependencies of target ydk_

    [ 50%] Building CXX object CMakeFiles/ydk_.dir/python.cpp.o

    /tmp/pip-build-uotkxcx1/ydk/python.cpp:551:198: warning: unused parameter ���port��� [-Wunused-parameter]

                 [](ydk::NetconfServiceProvider &nc_provider, const string& address, const string& username, const string& password, void* port, const string& protocol, bool on_demand, bool common_cache) {

                                                                                                                                                                                                          ^

    /tmp/pip-build-uotkxcx1/ydk/python.cpp:551:198: warning: unused parameter ���port��� [-Wunused-parameter]

    [100%] Linking CXX shared module ../lib.linux-x86_64-3.6/ydk_.so

    /usr/bin/ld: /usr/local/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC

    /usr/local/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a: error adding symbols: Bad value

    collect2: error: ld returned 1 exit status

    gmake[2]: *** [../lib.linux-x86_64-3.6/ydk_.so] Error 1

    gmake[1]: *** [CMakeFiles/ydk_.dir/all] Error 2

    gmake: *** [all] Error 2

    Traceback (most recent call last):

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

      File "/tmp/pip-build-uotkxcx1/ydk/setup.py", line 157, in <module>

        zip_safe=False,

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

        dist.run_commands()

      File "/usr/local/lib/python3.6/distutils/dist.py", line 955, in run_commands

        self.run_command(cmd)

      File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

      File "/users/skopperl/cafy_env/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run

        return orig.install.run(self)

      File "/usr/local/lib/python3.6/distutils/command/install.py", line 545, in run

        self.run_command('build')

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

        self.distribution.run_command(command)

      File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

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

        self.run_command(cmd_name)

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

        self.distribution.run_command(command)

      File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

      File "/tmp/pip-build-uotkxcx1/ydk/setup.py", line 69, in run

        self.build_extension(ext)

      File "/tmp/pip-build-uotkxcx1/ydk/setup.py", line 94, in build_extension

        subprocess.check_call(['cmake', '--build', '.'], cwd=self.build_temp)

      File "/usr/local/lib/python3.6/subprocess.py", line 291, in check_call

        raise CalledProcessError(retcode, cmd)

    subprocess.CalledProcessError: Command '['cmake', '--build', '.']' returned non-zero exit status 2.

   

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

Thanks,

Sivananda

Thanks! Just googling this error shows this solution: python - Relocation R_X86_64_32S against '_Py_NotImplementedStruct' can not be used when making a shared object; recompi…

Can you let me know if this works for you?

gjaimes
Level 5
Level 5

Same problem here :

u

buntu@ubuntu-xenial:/$ pip install ydk-models-cisco-ios-xr

Collecting ydk-models-cisco-ios-xr

  Downloading ydk_models_cisco_ios_xr-6.3.1-py2.py3-none-any.whl (19.9MB)

    100% |████████████████████████████████| 19.9MB 39kB/s

Collecting ydk-models-ietf>=0.1.3 (from ydk-models-cisco-ios-xr)

  Downloading ydk_models_ietf-0.1.4-py2.py3-none-any.whl (232kB)

    100% |████████████████████████████████| 235kB 364kB/s

Collecting ydk>=0.6.1 (from ydk-models-cisco-ios-xr)

  Downloading ydk-0.6.1.tar.gz

Collecting pybind11>=2.1.1 (from ydk>=0.6.1->ydk-models-cisco-ios-xr)

  Downloading pybind11-2.2.1-py2.py3-none-any.whl (143kB)

    100% |████████████████████████████████| 153kB 545kB/s

Building wheels for collected packages: ydk

  Running setup.py bdist_wheel for ydk ... error

  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-iYTs2_/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/tmpNwpuFXpip-wheel- --python-tag cp27:

  running bdist_wheel

  running build

  running build_py

  creating build

  creating build/lib.linux-x86_64-2.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  running build_ext

  Traceback (most recent call last):

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

    File "/tmp/pip-build-iYTs2_/ydk/setup.py", line 157, in <module>

      zip_safe=False,

    File "/usr/lib/python2.7/distutils/core.py", line 151, in setup

      dist.run_commands()

    File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands

      self.run_command(cmd)

    File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

      cmd_obj.run()

    File "/usr/lib/python2.7/dist-packages/wheel/bdist_wheel.py", line 179, in run

      self.run_command('build')

    File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command

      self.distribution.run_command(command)

    File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

      cmd_obj.run()

    File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run

      self.run_command(cmd_name)

    File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command

      self.distribution.run_command(command)

    File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command

      cmd_obj.run()

    File "/tmp/pip-build-iYTs2_/ydk/setup.py", line 66, in run

      ", ".join(e.name for e in self.extensions))

  RuntimeError: CMake must be installed to build the following extensions: ydk_

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

  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

Exception:

Traceback (most recent call last):

  File "/home/ubuntu/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main

    status = self.run(options, args)

  File "/home/ubuntu/.local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run

    prefix=options.prefix_path,

  File "/home/ubuntu/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install

    **kwargs

  File "/home/ubuntu/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install

    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)

  File "/home/ubuntu/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files

    isolated=self.isolated,

  File "/home/ubuntu/.local/lib/python2.7/site-packages/pip/wheel.py", line 345, in move_wheel_files

    clobber(source, lib_dir, True)

  File "/home/ubuntu/.local/lib/python2.7/site-packages/pip/wheel.py", line 316, in clobber

    ensure_dir(destdir)

  File "/home/ubuntu/.local/lib/python2.7/site-packages/pip/utils/__init__.py", line 83, in ensure_dir

    os.makedirs(path)

  File "/usr/lib/python2.7/os.py", line 157, in makedirs

    mkdir(name, mode)

OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/pybind11-2.2.1.dist-info'

ubuntu@ubuntu-xenial:/$

Any help ?

Thanks

Make sure you install libydk_0.6.1-1_amd64.deb.  If you're not installing in a Python virtual environment, you typically need to install your python packages as root.  See documentation at:

http://ydk.cisco.com/py/docs/getting_started.html#system-requirements

Thanks for the reply. But still having same errror, already tried under virtual environment. Can you please provide exact commands for  manual installation of libydk.