cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1320
Views
0
Helpful
9
Replies

System requirements to install ydk-py-0.8.0 in SUSE linux

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.

9 Replies 9

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

Installing from Source

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

 

 

Unfortunately, we don't test on SUSE, we do on CentOS and Ubuntu. If you get stuck, remember that you can always leverage the Vagrant sandbox or the docker container.

https://goo.gl/7d5DS8
https://hub.docker.com/r/ydkdev/ydk-py

HTH.

ygorelik
Cisco Employee
Cisco Employee

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

...

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.

Hi, Can anybody help to solve the error mentioned in my previous message.

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.

 

Hi, 

I have attached the build log. I have also recomipled the python with --enable-shared and -fPIC options. But still the same problem.

The gcc version is 8.2.0

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

 

Hi, 

Sorry for the late reply.

As I do not have internet accessibility to my work machine, I have installed all the library from the source.

Please find the build log of libydk.a attached.

Regards,

Shiva

 

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: