02-05-2019 04:39 AM
Can somebody please provide the details about what are the prerequisites to install ydk-py-0.8.0 in SUSE linux.
I tried installing it and get the following error.
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-req-build-3ps98u6q
ssh_threads_location
linked by target "ydk_" in directory /tmp/pip-req-build-3ps98u6q
ydk_location
linked by target "ydk_" in directory /tmp/pip-req-build-3ps98u6q
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-req-build-3ps98u6q/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-3ps98u6q/setup.py", line 151, in <module>
zip_safe=False,
File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/local/lib/python3.7/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/usr/local/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-3ps98u6q/setup.py", line 74, in run
self.build_extension(ext)
File "/tmp/pip-req-build-3ps98u6q/setup.py", line 106, in build_extension
subprocess.check_call([cmake_executable, ext.sourcedir] + cmake_args, cwd=self.build_temp)
File "/usr/local/lib/python3.7/subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-req-build-3ps98u6q', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-req-build-3ps98u6q/build/lib.linux-x86_64-3.7', '-DPYBIND11_INCLUDE=/usr/local/include/python3.7m;/root/.local/include/python3.7m', '-DPYTHON_VERSION=3.7m', '-DCMAKE_BUILD_TYPE=Release', '-DCOVERAGE=False']' returned non-zero exit status 1.
02-05-2019 05:33 AM
I am installing ydk-py from the source and I was able to resolve other errors except the below one. Please suggest how to resolve this error.
ydk_location
linked by target "ydk_" in directory /tmp/pip-req-build-3ps98u6q
I followed below mentioned steps
If you prefer not to use the YDK packages in the Python package index, you need to install manually the ydk core package and then the model bundles you plan to use. To install the ydk core package, execute:
$ cd core core$ python setup.py sdist core$ pip install dist/ydk*.gz
02-05-2019 09:42 AM
02-05-2019 09:41 AM
Hello pathori
Officially we do not support openSUSI platform, meaning we do not provide pre-built YDK libraries and documentation. But I don't see why you could not run YDK based application on it. The difference is that you need to install C++ core libraries from source. You need to make sure that gcc and g++ compilers are of version 5.x or higher to support C++ 2011.
Based on the log in your post you are missing: curl, libydk and libssh_threads libraries.
To install curl please follow this.
Please follow this instruction to install libssh_threads.
Before installing libydk please make sure the dependencies like these are satisfied on your platform.
To install libydk:
git clone https://github.com/CiscoDevNet/ydk-gen.git
cd ydk-gen
git checkout tags/0.8.0 -b 0.8.0
./generate.py libydk
cd gen-api/cpp/ydk/build
make && sudo make install
cd -
Please check that Python requirements are satisfied, then install YDK and model bundles from pypi.org:
sudo pip install ydk
sudo pip install ydk-models-cisco-ios-xr
...
02-07-2019 02:33 AM
Hi,
I could able to install ydk-py-0.8.0 successfully, But when I run the sample app examples from core/samples folder I get the following error
/home/ydk-py-0.8.0/core/samples # ./oc-interfaces.py
Traceback (most recent call last):
File "./oc-interfaces.py", line 28, in <module>
from ydk.types import Empty, DELETE, Decimal64
File "/usr/local/lib/python3.7/site-packages/ydk/types/__init__.py", line 17, in <module>
from .py_types import Entity, EntityCollection, Config, Filter, YList, YLeafList
File "/usr/local/lib/python3.7/site-packages/ydk/types/py_types.py", line 35, in <module>
from ydk_ import is_set
ImportError: dynamic module does not define init function (initydk_)
/home/ydk-py-0.8.0/core/samples #
Please help me to resolve.
02-10-2019 10:37 PM
Hi, Can anybody help to solve the error mentioned in my previous message.
02-11-2019 10:06 AM
Have you followed my instructions?
Please post the log?
Important!
When installing ydk Python package, please add '-v' option to get all installation details, like this:
[sudo] pip install ydk -v
Pay special attention to cmake log, which shows setting for PythonLib. It must point to libpython<version>.so shared library matching with the Python version that you are using for pip. If not matching, which is expected in your case, please install Python from official distribution or recompile it with '--enabled_shared' option. Also the gcc compiler must be version 5.x or higher. If lower, please install gcc-5, then recompile the libydk and libydk_gnmi (optional). Then repeat the python package installation.
02-14-2019 01:31 AM
02-14-2019 05:45 PM
Hi pathori
From your log I do not see how the libydk.a was built and installed. Considering that you are using gcc-8, it is important to compile and install this library from source, rather then using pre-built artifact. Note that the pre-built C++ distribution packages are built with gcc-5 and hence most likely are not compatible with gcc-8 system libraries installed on your computer. In previous posts I have already described, how the C++ library should be built and installed.
Regards, Yan
02-25-2019 11:14 PM - edited 02-25-2019 11:17 PM
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