CiscoDevNet / ydk-py

This project has been archived and the repository will no longer be updated. Python SDK generated from YANG data models.
http://ydk.io
Apache License 2.0
184 stars 62 forks source link

how to install the ydk environment offline #45

Closed fcgxz2003 closed 5 years ago

fcgxz2003 commented 5 years ago

I want to install the ydk environment offline,so I installed the ydk in the virtual environment and run the code success, and then i copy the ydk packet to other environment ,and run the same code ,but get the error which is the following:

File "/sf/xz_remote1/code/netconf/drivers/huawei/CE6850/huawei_service.py", line 9, in from ydk.services import CodecService File "/usr/lib/python2.7/site-packages/ydk/services/init.py", line 17, in from .codec_service import CodecService File "/usr/lib/python2.7/site-packages/ydk/services/codec_service.py", line 21, in from ydk.entity_utils import get_data_node_from_entity as _get_data_node_from_entity File "/usr/lib/python2.7/site-packages/ydk/entity_utils/init.py", line 17, in from ydk.ext.entity_utils import get_data_node_from_entity File "/usr/lib/python2.7/site-packages/ydk/exthook.py", line 87, in load_module raise ImportError('No module named %s' % fullname) ImportError: No module named ydk.ext.entity_utils

If this method is not right , what should I do to install ydk environment offline?

ygorelik commented 5 years ago

The simple copying of the package is not going to work, because of compilation and linking phase of python.cpp. This is specific to the platform, Python version/libraries and C++ compiler. You need to go over the System Requirements and Installation process on each platform where you install the YDK.