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

YDK Install Failing on OSX & CentOS

MrPaul
Level 1
Level 1

I'm trying to install this on both OSX & CentOS with no luck.  I'm confident there is somethig wrong with my environment but unable to identify it.  Hoping someone can point me in the right direction.

 

I would prefer to get this working on OSX.  xcode is installed as well as homebrew.  Python is installed from source via asdf (pyenv).  I do see an error about cmake from the log below but that also exists and is executable from the command line.

 

$ pipenv install ydk                                                                                               
Creating a virtualenv for this project…
Pipfile: /home/USERNAME/tmp/Pipfile
Using /home/USERNAME/.asdf/installs/python/3.8.2/bin/python3.8 (3.8.2) to create virtualenv…
⠴ Creating virtual environment...created virtual environment CPython3.8.2.final.0-64 in 309ms
 creator CPython3Posix(dest=/home/USERNAME/.local/share/virtualenvs/tmp-g6-Tn6kM, clear=False, global=False)
 seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/USERNAME/.local/share/virtualenv/seed-app-data/v1)
 activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator

✔ Successfully created virtual environment! 
Virtualenv location: /home/USERNAME/.local/share/virtualenvs/tmp-g6-Tn6kM
Creating a Pipfile for this project…
Installing ydk…
Adding ydk to Pipfile's [packages]…
✔ Installation Succeeded 
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
✔ Success! 
Updated Pipfile.lock (812b5a)!
Installing dependencies from Pipfile.lock (812b5a)…
An error occurred while installing ydk==0.8.4 --hash=sha256:ffb3b4140451fda5144231e39e5f8fe44a1a63e10c88ce3e5359cb61ef22620c! Will try again.
 🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 2/2 — 
Installing initially failed dependencies…
[pipenv.exceptions.InstallError]:   File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/site-packages/pipenv/core.py", line 1983, in do_install
[pipenv.exceptions.InstallError]:       do_init(
[pipenv.exceptions.InstallError]:   File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/site-packages/pipenv/core.py", line 1246, in do_init
[pipenv.exceptions.InstallError]:       do_install_dependencies(
[pipenv.exceptions.InstallError]:   File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/site-packages/pipenv/core.py", line 858, in do_install_dependencies
[pipenv.exceptions.InstallError]:       batch_install(
[pipenv.exceptions.InstallError]:   File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/site-packages/pipenv/core.py", line 763, in batch_install
[pipenv.exceptions.InstallError]:       _cleanup_procs(procs, not blocking, failed_deps_queue, retry=retry)
[pipenv.exceptions.InstallError]:   File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/site-packages/pipenv/core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: ['Collecting ydk==0.8.4`
`  Using cached ydk-0.8.4.tar.gz (33 kB)
Building wheels for collected packages: ydk
  Building wheel for ydk (setup.py): started', "  Building wheel for ydk (setup.py): finished with status 'error'", '  Running setup.py clean for ydk
Failed to build ydk
Installing collected packages: ydk
    Running setup.py install for ydk: started', "    Running setup.py install for ydk: finished with status 'error'"]
[pipenv.exceptions.InstallError]: ['ERROR: Command errored out with exit status 1:
   command: /home/USERNAME/.local/share/virtualenvs/tmp-g6-Tn6kM/bin/python -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'/tmp/pip-install-balhwoxk/ydk/setup.py\'"\'"\'; __file__=\'"\'"\'/tmp/pip-install-balhwoxk/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-6atf3pm7
       cwd: /tmp/pip-install-balhwoxk/ydk/
  Complete output (90 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/filters
  copying ydk/filters/__init__.py -> build/lib.linux-x86_64-3.8/ydk/filters
  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/ext
  copying ydk/ext/__init__.py -> build/lib.linux-x86_64-3.8/ydk/ext
  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/providers
  copying ydk/providers/netconf_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
  copying ydk/providers/codec_provider.py -> build/lib.linux-x86_64-3.8/ydk/providers
  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/logging
  copying ydk/logging/__init__.py -> build/lib.linux-x86_64-3.8/ydk/logging
  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/entity_utils
  copying ydk/entity_utils/__init__.py -> 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
  creating 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/crud_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
  copying ydk/services/codec_service.py -> build/lib.linux-x86_64-3.8/ydk/services
  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/_dm_meta_info.py -> build/lib.linux-x86_64-3.8/ydk/_core
  copying ydk/_core/__init__.py -> build/lib.linux-x86_64-3.8/ydk/_core
  creating 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
  copying ydk/path/sessions/netconf_session.py -> build/lib.linux-x86_64-3.8/ydk/path/sessions
  warning: build_py: byte-compiling is disabled, skipping.
  
  running build_ext
  Traceback (most recent call last):
    File "/tmp/pip-install-balhwoxk/ydk/setup.py", line 62, in run', "      subprocess.check_output(['cmake
--version'])", '    File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/subprocess.py", line 411, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/subprocess.py", line 489, in run
      with Popen(*popenargs, **kwargs) as process:
    File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/subprocess.py", line 854, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/subprocess.py", line 1702, in _execute_child
      raise child_exception_type(errno_num, err_msg, err_filename)', "  FileNotFoundError: [Errno 2] No such file or directory: 'cmake'", '  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-balhwoxk/ydk/setup.py", line 111, in <module>
      setup(
    File "/home/USERNAME/.local/share/virtualenvs/tmp-g6-Tn6kM/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
      return distutils.core.setup(**attrs)
    File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/USERNAME/.local/share/virtualenvs/tmp-g6-Tn6kM/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 223, in run', "      self.run_command('build')", '    File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-balhwoxk/ydk/setup.py", line 64, in run
      raise RuntimeError("CMake must be installed to build the following extensions: " +
  RuntimeError: CMake must be installed to build the following extensions: ydk_
  ----------------------------------------
  ERROR: Failed building wheel for ydk
    ERROR: Command errored out with exit status 1:
     command: /home/USERNAME/.local/share/virtualenvs/tmp-g6-Tn6kM/bin/python -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'/tmp/pip-install-balhwoxk/ydk/setup.py\'"\'"\'; __file__=\'"\'"\'/tmp/pip-install-balhwoxk/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-u8vq6xn1/install-record.txt --single-version-externally-managed --compile --install-headers /home/USERNAME/.local/share/virtualenvs/tmp-g6-Tn6kM/include/site/python3.8/ydk
         cwd: /tmp/pip-install-balhwoxk/ydk/
    Complete output (92 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/filters
    copying ydk/filters/__init__.py -> build/lib.linux-x86_64-3.8/ydk/filters
    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/ext
    copying ydk/ext/__init__.py -> build/lib.linux-x86_64-3.8/ydk/ext
    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/providers
    copying ydk/providers/netconf_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
    copying ydk/providers/codec_provider.py -> build/lib.linux-x86_64-3.8/ydk/providers
    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/logging
    copying ydk/logging/__init__.py -> build/lib.linux-x86_64-3.8/ydk/logging
    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/entity_utils
    copying ydk/entity_utils/__init__.py -> 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
    creating 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/crud_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
    copying ydk/services/codec_service.py -> build/lib.linux-x86_64-3.8/ydk/services
    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/_dm_meta_info.py -> build/lib.linux-x86_64-3.8/ydk/_core
    copying ydk/_core/__init__.py -> build/lib.linux-x86_64-3.8/ydk/_core
    creating 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
    copying ydk/path/sessions/netconf_session.py -> build/lib.linux-x86_64-3.8/ydk/path/sessions
    warning: build_py: byte-compiling is disabled, skipping.
    
    running build_ext
    Traceback (most recent call last):
      File "/tmp/pip-install-balhwoxk/ydk/setup.py", line 62, in run', "        subprocess.check_output(['cmake
--version'])", '      File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/subprocess.py", line 411, in check_output
        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/subprocess.py", line 489, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/subprocess.py", line 854, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/subprocess.py", line 1702, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)', "    FileNotFoundError: [Errno 2] No such file or directory: 'cmake'", '    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-balhwoxk/ydk/setup.py", line 111, in <module>
        setup(
      File "/home/USERNAME/.local/share/virtualenvs/tmp-g6-Tn6kM/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
        return distutils.core.setup(**attrs)
      File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/home/USERNAME/.local/share/virtualenvs/tmp-g6-Tn6kM/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/distutils/command/install.py", line 545, in run', "        self.run_command('build')", '      File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/home/USERNAME/.asdf/installs/python/3.8.2/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/tmp/pip-install-balhwoxk/ydk/setup.py", line 64, in run
        raise RuntimeError("CMake must be installed to build the following extensions: " +
    RuntimeError: CMake must be installed to build the following extensions: ydk_
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/USERNAME/.local/share/virtualenvs/tmp-g6-Tn6kM/bin/python -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'/tmp/pip-install-balhwoxk/ydk/setup.py\'"\'"\'; __file__=\'"\'"\'/tmp/pip-install-balhwoxk/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-u8vq6xn1/install-record.txt --single-version-externally-managed --compile --install-headers /home/USERNAME/.local/share/virtualenvs/tmp-g6-Tn6kM/include/site/python3.8/ydk Check the logs for full command output.']
ERROR: ERROR: Package installation failed...
2 Replies 2

MrPaul
Level 1
Level 1

I've narrowed the problem down to readline as pipenv install readline is failing.  No need for you guys here to spend time on this since it's not a ydk issue.  I'll work in docker until I fix this.

yangorelik
Spotlight
Spotlight

Hello MrPaul

Sorry, I missed your post.

From your log it is obvious that you did not follow system requirements and installation instructions published on GitHub. Start reading and follow from here. Also consider this.

Yan Gorelik
YDK Solutions