07-13-2021 11:32 AM
Hi,
My server is on centos 7.9
I am following the steps mentioned in https://github.com/ygorelik/ydk-gen to install
However, I am seeing the below error
```
python version: 3.6m
-- Found PythonLibs: /usr/lib64/libpython3.6m.so (found version "3.6.8")
pybind11 include: include;include
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-req-build-fikngrcl/build/temp.linux-x86_64-3.6
Scanning dependencies of target ydk_
[ 50%] Building CXX object CMakeFiles/ydk_.dir/python.cpp.o
/tmp/pip-req-build-fikngrcl/python.cpp:16:10: fatal error: pybind11/operators.h: No such file or directory
#include <pybind11/operators.h>
^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/ydk_.dir/python.cpp.o] 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-req-build-fikngrcl/setup.py", line 145, in <module>
zip_safe=False,
File "/root/venv/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/cisco/depot/python3/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/cisco/depot/python3/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/cisco/depot/python3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/root/venv/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 223, in run
self.run_command('build')
File "/usr/cisco/depot/python3/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/cisco/depot/python3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/cisco/depot/python3/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/cisco/depot/python3/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/cisco/depot/python3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-fikngrcl/setup.py", line 68, in run
self.build_extension(ext)
File "/tmp/pip-req-build-fikngrcl/setup.py", line 101, in build_extension
subprocess.check_call([cmake_executable, '--build', '.'], cwd=self.build_temp)
File "/usr/cisco/depot/python3/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake3', '--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 /root/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-fikngrcl/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-od_8px1d/install-record.txt --single-version-externally-managed --compile --install-headers /root/venv/include/site/python3.6/ydk:
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/_core
copying ydk/_core/__init__.py -> build/lib.linux-x86_64-3.6/ydk/_core
copying ydk/_core/_dm_meta_info.py -> build/lib.linux-x86_64-3.6/ydk/_core
copying ydk/_core/_importer.py -> build/lib.linux-x86_64-3.6/ydk/_core
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
copying ydk/entity_utils/entity_utils.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
copying ydk/providers/netconf_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
creating build/lib.linux-x86_64-3.6/ydk/path/sessions
copying ydk/path/sessions/__init__.py -> build/lib.linux-x86_64-3.6/ydk/path/sessions
copying ydk/path/sessions/netconf_session.py -> build/lib.linux-x86_64-3.6/ydk/path/sessions
copying ydk/path/sessions/restconf_session.py -> build/lib.linux-x86_64-3.6/ydk/path/sessions
running build_ext
-- The C compiler identification is GNU 7.3.1
-- The CXX compiler identification is GNU 7.3.1
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /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: /bin/c++
-- Check for working CXX compiler: /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.6m
-- Found PythonLibs: /usr/lib64/libpython3.6m.so (found version "3.6.8")
pybind11 include: include;include
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-req-build-fikngrcl/build/temp.linux-x86_64-3.6
Scanning dependencies of target ydk_
[ 50%] Building CXX object CMakeFiles/ydk_.dir/python.cpp.o
/tmp/pip-req-build-fikngrcl/python.cpp:16:10: fatal error: pybind11/operators.h: No such file or directory
#include <pybind11/operators.h>
^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/ydk_.dir/python.cpp.o] 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-req-build-fikngrcl/setup.py", line 145, in <module>
zip_safe=False,
File "/root/venv/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/cisco/depot/python3/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/cisco/depot/python3/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/cisco/depot/python3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/root/venv/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/cisco/depot/python3/lib/python3.6/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/usr/cisco/depot/python3/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/cisco/depot/python3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/cisco/depot/python3/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/cisco/depot/python3/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/cisco/depot/python3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-fikngrcl/setup.py", line 68, in run
self.build_extension(ext)
File "/tmp/pip-req-build-fikngrcl/setup.py", line 101, in build_extension
subprocess.check_call([cmake_executable, '--build', '.'], cwd=self.build_temp)
File "/usr/cisco/depot/python3/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake3', '--build', '.']' returned non-zero exit status 2.
----------------------------------------
Command "/root/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-fikngrcl/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-od_8px1d/install-record.txt --single-version-externally-managed --compile --install-headers /root/venv/include/site/python3.6/ydk" failed with error code 1 in /tmp/pip-req-build-fikngrcl/
You are using pip version 10.0.1, however version 21.1.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Solved! Go to Solution.
07-15-2021 02:55 PM
Thank you for your prompt response @yangorelik .
Yes, I have deleted the other venv and but that didnt seem to be the problem. The issue was with the pip version 10.0.0.1 which caused the pybind11 headers to be not found.
Installing lower version of pip helped
pip install pip==9.0.3
These are some reference links:
https://github.com/pybind/python_example/issues/18#issuecomment-379532037
07-13-2021 12:18 PM
Hi @shreyash
It looks like you are missing installation of pybind11 package. Try "locate pybind11" or "pip list | grep pybind11" to see if it was installed. If missing, you need activate Python virtual environment and then run "pip install -r requirements.txt" from ydk-gen directory. Make sure Python core installation is performed under virtual environment. If you don not use virtual environment, then you need to follow logic of script install_ydk.sh and execute all the steps manually.
Unfortunately I cannot see full list of console output during the installation and cannot give you precise reason why this package is missing.
07-13-2021 12:50 PM
pybind11 package is installed. Here is the output:
```
(ydk-env) root@cafy-2:ydk-gen$ locate pybind11
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/attr.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/buffer_info.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/cast.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/chrono.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/common.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/complex.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/detail
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/eigen.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/embed.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/eval.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/functional.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/iostream.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/numpy.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/operators.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/options.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/pybind11.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/pytypes.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/stl.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/stl_bind.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/detail/class.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/detail/common.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/detail/descr.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/detail/init.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/detail/internals.h
/home/shreyash/ydk-gen/ydk-env/include/site/python3.6/pybind11/detail/typeid.h
/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/pybind11
/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/pybind11-2.2.2.dist-info
/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/pybind11/__init__.py
/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/pybind11/__main__.py
/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/pybind11/__pycache__
/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/pybind11/_version.py
/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/pybind11/__pycache__/__init__.cpython-36.pyc
/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/pybind11/__pycache__/__main__.cpython-36.pyc
/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/pybind11/__pycache__/_version.cpython-36.pyc
/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/pybind11-2.2.2.dist-info/DESCRIPTION.rst
/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/pybind11-2.2.2.dist-info/INSTALLER
/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/pybind11-2.2.2.dist-info/METADATA
/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/pybind11-2.2.2.dist-info/RECORD
/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/pybind11-2.2.2.dist-info/WHEEL
/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/pybind11-2.2.2.dist-info/metadata.json
/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/pybind11-2.2.2.dist-info/top_level.txt
/root/venv/include/site/python3.6/pybind11
/root/venv/include/site/python3.6/pybind11/attr.h
/root/venv/include/site/python3.6/pybind11/buffer_info.h
/root/venv/include/site/python3.6/pybind11/cast.h
/root/venv/include/site/python3.6/pybind11/chrono.h
/root/venv/include/site/python3.6/pybind11/common.h
/root/venv/include/site/python3.6/pybind11/complex.h
/root/venv/include/site/python3.6/pybind11/detail
/root/venv/include/site/python3.6/pybind11/eigen.h
/root/venv/include/site/python3.6/pybind11/embed.h
/root/venv/include/site/python3.6/pybind11/eval.h
/root/venv/include/site/python3.6/pybind11/functional.h
/root/venv/include/site/python3.6/pybind11/iostream.h
/root/venv/include/site/python3.6/pybind11/numpy.h
/root/venv/include/site/python3.6/pybind11/operators.h
/root/venv/include/site/python3.6/pybind11/options.h
/root/venv/include/site/python3.6/pybind11/pybind11.h
/root/venv/include/site/python3.6/pybind11/pytypes.h
/root/venv/include/site/python3.6/pybind11/stl.h
/root/venv/include/site/python3.6/pybind11/stl_bind.h
/root/venv/include/site/python3.6/pybind11/detail/class.h
/root/venv/include/site/python3.6/pybind11/detail/common.h
/root/venv/include/site/python3.6/pybind11/detail/descr.h
/root/venv/include/site/python3.6/pybind11/detail/init.h
/root/venv/include/site/python3.6/pybind11/detail/internals.h
/root/venv/include/site/python3.6/pybind11/detail/typeid.h
/root/venv/lib/python3.6/site-packages/pybind11
/root/venv/lib/python3.6/site-packages/pybind11-2.2.2.dist-info
/root/venv/lib/python3.6/site-packages/pybind11/__init__.py
/root/venv/lib/python3.6/site-packages/pybind11/__main__.py
/root/venv/lib/python3.6/site-packages/pybind11/__pycache__
/root/venv/lib/python3.6/site-packages/pybind11/_version.py
/root/venv/lib/python3.6/site-packages/pybind11/__pycache__/__init__.cpython-36.pyc
/root/venv/lib/python3.6/site-packages/pybind11/__pycache__/__main__.cpython-36.pyc
/root/venv/lib/python3.6/site-packages/pybind11/__pycache__/_version.cpython-36.pyc
/root/venv/lib/python3.6/site-packages/pybind11-2.2.2.dist-info/DESCRIPTION.rst
/root/venv/lib/python3.6/site-packages/pybind11-2.2.2.dist-info/INSTALLER
/root/venv/lib/python3.6/site-packages/pybind11-2.2.2.dist-info/METADATA
/root/venv/lib/python3.6/site-packages/pybind11-2.2.2.dist-info/RECORD
/root/venv/lib/python3.6/site-packages/pybind11-2.2.2.dist-info/WHEEL
/root/venv/lib/python3.6/site-packages/pybind11-2.2.2.dist-info/metadata.json
/root/venv/lib/python3.6/site-packages/pybind11-2.2.2.dist-info/top_level.txt
(ydk-env) root@cafy-2:ydk-gen$
(ydk-env) root@cafy-2:ydk-gen$
07-13-2021 12:53 PM
I am following these steps from here: https://github.com/ygorelik/ydk-gen
git clone https://github.com/ygorelik/ydk-gen.git
cd ydk-gen
export YDKGEN_HOME=`pwd` # optional
export PYTHON_VENV=$HOME/ydk_vne # optional
./install_ydk.sh --core
07-13-2021 12:55 PM
```
Successfully created source distribution at /home/shreyash/ydk-gen/gen-api/python/ydk/dist
=================================================
Successfully generated Python YDK core package at /home/shreyash/ydk-gen/gen-api/python/ydk
Please refer to the README for information on how to install the package in your environment
Installing python package ydk-0.8.5.post2.tar.gz ...
Processing ./dist/ydk-0.8.5.post2.tar.gz
Requirement not upgraded as not directly required: pybind11>=2.2.2 in /home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages (from ydk==0.8.5.post2) (2.2.2)
Building wheels for collected packages: ydk
Running setup.py bdist_wheel for ydk ... error
Complete output from command /home/shreyash/ydk-gen/ydk-env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-t1psgpxa/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-6f595z7w --python-tag cp36:
running bdist_wheel
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/_core
copying ydk/_core/__init__.py -> build/lib.linux-x86_64-3.6/ydk/_core
copying ydk/_core/_dm_meta_info.py -> build/lib.linux-x86_64-3.6/ydk/_core
copying ydk/_core/_importer.py -> build/lib.linux-x86_64-3.6/ydk/_core
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
copying ydk/entity_utils/entity_utils.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
copying ydk/providers/netconf_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
creating build/lib.linux-x86_64-3.6/ydk/path/sessions
copying ydk/path/sessions/__init__.py -> build/lib.linux-x86_64-3.6/ydk/path/sessions
copying ydk/path/sessions/netconf_session.py -> build/lib.linux-x86_64-3.6/ydk/path/sessions
copying ydk/path/sessions/restconf_session.py -> build/lib.linux-x86_64-3.6/ydk/path/sessions
running build_ext
-- The C compiler identification is GNU 7.3.1
-- The CXX compiler identification is GNU 7.3.1
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /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: /bin/c++
-- Check for working CXX compiler: /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.6m
-- Found PythonLibs: /usr/cisco/packages/python/python-3.6.7/lib/libpython3.6m.so (found version "3.6.7")
pybind11 include: include;include
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-req-build-t1psgpxa/build/temp.linux-x86_64-3.6
Scanning dependencies of target ydk_
[ 50%] Building CXX object CMakeFiles/ydk_.dir/python.cpp.o
/tmp/pip-req-build-t1psgpxa/python.cpp:16:10: fatal error: pybind11/operators.h: No such file or directory
#include <pybind11/operators.h>
^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/ydk_.dir/python.cpp.o] 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-req-build-t1psgpxa/setup.py", line 145, in <module>
zip_safe=False,
File "/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/cisco/depot/python3/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/cisco/depot/python3/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/cisco/depot/python3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/shreyash/ydk-gen/ydk-env/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 223, in run
self.run_command('build')
File "/usr/cisco/depot/python3/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/cisco/depot/python3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/cisco/depot/python3/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/cisco/depot/python3/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/cisco/depot/python3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-t1psgpxa/setup.py", line 68, in run
self.build_extension(ext)
File "/tmp/pip-req-build-t1psgpxa/setup.py", line 101, in build_extension
subprocess.check_call([cmake_executable, '--build', '.'], cwd=self.build_temp)
File "/usr/cisco/depot/python3/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake3', '--build', '.']' returned non-zero exit status 2.
----------------------------------------
Failed building wheel for ydk
07-13-2021 03:13 PM
any idea @yangorelik
07-14-2021 10:06 AM
You have created 2 virtual environments; you need delete one of them to avoid confusion:
/root/venv/ # default one, which is chosen below
/home/shreyash/ydk-gen/ydk-env/ # user defined
Try to set environment variables that define C/C++ include paths:
export C_INCLUDE_PATH=/usr/local/include:/root/venv/include/site/python3.6
export CPLUS_INCLUDE_PATH=/usr/local/include:/root/venv/include/site/python3.6
Then repeat installation of Python YDK core package:
cd ~/ydk-gen/
source /root/venv/bin/activate
./generate.py --core -iv
07-15-2021 02:55 PM
Thank you for your prompt response @yangorelik .
Yes, I have deleted the other venv and but that didnt seem to be the problem. The issue was with the pip version 10.0.0.1 which caused the pybind11 headers to be not found.
Installing lower version of pip helped
pip install pip==9.0.3
These are some reference links:
https://github.com/pybind/python_example/issues/18#issuecomment-379532037
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide