cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
448
Views
2
Helpful
4
Replies
xp_pratibha
Beginner

[Failure : MAC] pip install ydk-models-cisco-ios-xr

Hi ,

  I am trying to install ydk for ios-xr in MAC. I am getting the below error:

Any help/insight is much appreciated.

pip install ydk-models-cisco-ios-xr

Collecting ydk-models-cisco-ios-xr

  Using cached ydk_models_cisco_ios_xr-6.3.1-py2.py3-none-any.whl

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

  Using cached ydk-0.7.0.tar.gz

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

  Using cached ydk_models_ietf-0.1.4-py2.py3-none-any.whl

Requirement already satisfied: pybind11>=2.1.1 in /Library/Python/2.7/site-packages (from ydk>=0.6.1->ydk-models-cisco-ios-xr)

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

  Running setup.py install for ydk ... error

    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/yw/7rt2w66903g2p3_fpmghn7mnvhz38b/T/pip-build-9j53DA/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 /var/folders/yw/7rt2w66903g2p3_fpmghn7mnvhz38b/T/pip-1OMVIC-record/install-record.txt --single-version-externally-managed --compile:

    running install

    running build

    running build_py

    creating build

    creating build/lib.macosx-10.13-intel-2.7

    creating build/lib.macosx-10.13-intel-2.7/ydk

    copying ydk/__init__.py -> build/lib.macosx-10.13-intel-2.7/ydk

    copying ydk/exthook.py -> build/lib.macosx-10.13-intel-2.7/ydk

    creating build/lib.macosx-10.13-intel-2.7/ydk/filters

    copying ydk/filters/__init__.py -> build/lib.macosx-10.13-intel-2.7/ydk/filters

    creating build/lib.macosx-10.13-intel-2.7/ydk/types

    copying ydk/types/__init__.py -> build/lib.macosx-10.13-intel-2.7/ydk/types

    copying ydk/types/py_types.py -> build/lib.macosx-10.13-intel-2.7/ydk/types

    creating build/lib.macosx-10.13-intel-2.7/ydk/providers

    copying ydk/providers/__init__.py -> build/lib.macosx-10.13-intel-2.7/ydk/providers

    copying ydk/providers/codec_provider.py -> build/lib.macosx-10.13-intel-2.7/ydk/providers

    creating build/lib.macosx-10.13-intel-2.7/ydk/path

    copying ydk/path/__init__.py -> build/lib.macosx-10.13-intel-2.7/ydk/path

    creating build/lib.macosx-10.13-intel-2.7/ydk/ext

    copying ydk/ext/__init__.py -> build/lib.macosx-10.13-intel-2.7/ydk/ext

    creating build/lib.macosx-10.13-intel-2.7/ydk/entity_utils

    copying ydk/entity_utils/__init__.py -> build/lib.macosx-10.13-intel-2.7/ydk/entity_utils

    creating build/lib.macosx-10.13-intel-2.7/ydk/models

    copying ydk/models/__init__.py -> build/lib.macosx-10.13-intel-2.7/ydk/models

    creating build/lib.macosx-10.13-intel-2.7/ydk/errors

    copying ydk/errors/__init__.py -> build/lib.macosx-10.13-intel-2.7/ydk/errors

    copying ydk/errors/error_handler.py -> build/lib.macosx-10.13-intel-2.7/ydk/errors

    creating build/lib.macosx-10.13-intel-2.7/ydk/logging

    copying ydk/logging/__init__.py -> build/lib.macosx-10.13-intel-2.7/ydk/logging

    creating build/lib.macosx-10.13-intel-2.7/ydk/services

    copying ydk/services/netconf_service.py -> build/lib.macosx-10.13-intel-2.7/ydk/services

    copying ydk/services/__init__.py -> build/lib.macosx-10.13-intel-2.7/ydk/services

    copying ydk/services/executor_service.py -> build/lib.macosx-10.13-intel-2.7/ydk/services

    copying ydk/services/crud_service.py -> build/lib.macosx-10.13-intel-2.7/ydk/services

    copying ydk/services/codec_service.py -> build/lib.macosx-10.13-intel-2.7/ydk/services

    creating build/lib.macosx-10.13-intel-2.7/ydk/path/sessions

    copying ydk/path/sessions/netconf_session.py -> build/lib.macosx-10.13-intel-2.7/ydk/path/sessions

    copying ydk/path/sessions/__init__.py -> build/lib.macosx-10.13-intel-2.7/ydk/path/sessions

    copying ydk/path/sessions/restconf_session.py -> build/lib.macosx-10.13-intel-2.7/ydk/path/sessions

    running build_ext

    -- The C compiler identification is AppleClang 9.0.0.9000039

    -- The CXX compiler identification is AppleClang 9.0.0.9000039

    -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc

    -- Check for working C compiler: /Library/Developer/CommandLineTools/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: /Library/Developer/CommandLineTools/usr/bin/c++

    -- Check for working CXX compiler: /Library/Developer/CommandLineTools/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: 2.7

    -- Found PythonLibs: /usr/lib/libpython2.7.dylib (found version "2.7.10")

    pybind11 include: /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7;/Users/pxavierp/Library/Python/2.7/include/python2.7

    -- Configuring done

    -- Generating done

    -- Build files have been written to: /private/var/folders/yw/7rt2w66903g2p3_fpmghn7mnvhz38b/T/pip-build-9j53DA/ydk/build/temp.macosx-10.13-intel-2.7

    Scanning dependencies of target ydk_

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

    /private/var/folders/yw/7rt2w66903g2p3_fpmghn7mnvhz38b/T/pip-build-9j53DA/ydk/python.cpp:16:10: fatal error: 'pybind11/operators.h' file not found

    #include <pybind11/operators.h>

             ^~~~~~~~~~~~~~~~~~~~~~

    1 error generated.

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

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

    make: *** [all] Error 2

    Traceback (most recent call last):

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

      File "/private/var/folders/yw/7rt2w66903g2p3_fpmghn7mnvhz38b/T/pip-build-9j53DA/ydk/setup.py", line 145, in <module>

        zip_safe=False,

      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup

        dist.run_commands()

      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands

        self.run_command(cmd)

      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command

        cmd_obj.run()

      File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/install.py", line 61, in run

        return orig.install.run(self)

      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 573, in run

        self.run_command('build')

      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command

        self.distribution.run_command(command)

      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command

        cmd_obj.run()

      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run

        self.run_command(cmd_name)

      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command

        self.distribution.run_command(command)

      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command

        cmd_obj.run()

      File "/private/var/folders/yw/7rt2w66903g2p3_fpmghn7mnvhz38b/T/pip-build-9j53DA/ydk/setup.py", line 72, in run

        self.build_extension(ext)

      File "/private/var/folders/yw/7rt2w66903g2p3_fpmghn7mnvhz38b/T/pip-build-9j53DA/ydk/setup.py", line 101, in build_extension

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

      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call

        raise CalledProcessError(retcode, cmd)

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

   

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

Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/yw/7rt2w66903g2p3_fpmghn7mnvhz38b/T/pip-build-9j53DA/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 /var/folders/yw/7rt2w66903g2p3_fpmghn7mnvhz38b/T/pip-1OMVIC-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/yw/7rt2w66903g2p3_fpmghn7mnvhz38b/T/pip-build-9j53DA/ydk/

1 ACCEPTED SOLUTION

Accepted Solutions
abhirame
Cisco Employee

I was able to work around this by the below steps. Let me know if this works for you

brew install pybind11

[sudo] pip install ydk-models-cisco-ios-xr

View solution in original post

4 REPLIES 4
abhirame
Cisco Employee

I was able to work around this by the below steps. Let me know if this works for you

brew install pybind11

[sudo] pip install ydk-models-cisco-ios-xr

View solution in original post

Thanks your solution solved the problem.

did not solve my problem on Ubuntu 20.04, my system says:

 

Requirement already satisfied: pybind11 in ./yangsuite/venv/lib/python3.8/site-packages (2.6.1)

 

Hi @Mawaheb Kabbara 

 

I have a few ideas you can try: 

 

  1. Maybe you can try Using pip3 to install Python3 modules
  2. Try reading this discussion Common Installation Problems and Solutions
Content for Community-Ad