cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
925
Views
2
Helpful
2
Replies

Error Installing YDK

brfoster
Cisco Employee
Cisco Employee

I'm hitting an error trying to install the YDK, can someone please help?

(ydkenv) [gibson@nso1 ~]$ pip list

Package    Version

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

pip        10.0.1

setuptools 39.2.0

wheel      0.31.1

(ydkenv) [gibson@nso1 ~]$ pip install ydk-models-cisco-ios-xr

Collecting ydk-models-cisco-ios-xr

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

  Using cached https://files.pythonhosted.org/packages/e9/b4/799d2ecd94658c764c50f503d345bc31db2231973b3bb19a5459620f87a6/ydk-0.7.1.tar.gz

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

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

  Using cached https://files.pythonhosted.org/packages/12/90/0f92a575dc60c8fba6d0c91d6b45abdb1058da9ebed40400cbcfad2ac0a7/pybind11-2.2.3-py2.py3-none-any.whl

Building wheels for collected packages: ydk

  Running setup.py bdist_wheel for ydk ... error

  Complete output from command /home/gibson/venvs/ydkenv/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-mSxrK8/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-fpN2aj --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/entity_utils

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

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

  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/ext

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

  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/logging

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

  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

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

  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/__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/crud_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

  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/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

  Traceback (most recent call last):

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

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

      zip_safe=False,

    File "/home/gibson/venvs/ydkenv/lib/python2.7/site-packages/setuptools/__init__.py", line 129, in setup

      return distutils.core.setup(**attrs)

    File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup

      dist.run_commands()

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

      self.run_command(cmd)

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

      cmd_obj.run()

    File "/home/gibson/venvs/ydkenv/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 202, in run

      self.run_command('build')

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

      self.distribution.run_command(command)

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

      cmd_obj.run()

    File "/usr/lib64/python2.7/distutils/command/build.py", line 127, in run

      self.run_command(cmd_name)

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

      self.distribution.run_command(command)

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

      cmd_obj.run()

    File "/tmp/pip-install-mSxrK8/ydk/setup.py", line 72, in run

      self.build_extension(ext)

    File "/tmp/pip-install-mSxrK8/ydk/setup.py", line 79, in build_extension

      pip.main(['install', 'pybind11>=2.1.1'])

  AttributeError: 'module' object has no attribute 'main'


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

  Failed building wheel for ydk

  Running setup.py clean for ydk

Failed to build ydk

1 ACCEPTED SOLUTION

Accepted Solutions

abhirame
Cisco Employee
Cisco Employee
2 REPLIES 2

abhirame
Cisco Employee
Cisco Employee

Looks like a problem with pip 10.0.1. Can you try this solution: python - AttributeError: Module Pip has no attribute 'main' - Stack Overflow

That fixed it, thanks!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: