cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2043
Views
2
Helpful
12
Replies

help with failed ydk core install / compilation

dave_stern
Beginner
Beginner

Having trouble getting past the core and netconf bundle installs. Assuming the error I get when installing the cisco-asr-ios-xr bundle is because the compliation of the core has failed (second error not shown or in the error log attached simply says it can't find ydk).

Can you give me an idea of what is wrong?

Getting an error when installing the core bundle

creating /usr/local/etc/bash_completion.d

    error: can't copy 'etc/bash_completion.d/pyang': doesn't exist or not a regular file

--compile failed with error code 1 in /tmp/pip_build_root/pyang

Exception information:

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main

    status = self.run(options, args)

  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run

    requirement_set.install(install_options, global_options, root=options.root_path)

  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1436, in install

    requirement.install(install_options, global_options, *args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 707, in install

    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)

  File "/usr/lib/python2.7/dist-packages/pip/util.py", line 715, in call_subprocess

    % (command_desc, proc.returncode, cwd))

InstallationError: Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pyang/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-n3EUej-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pyang

12 Replies 12

xiaoqinz
Enthusiast
Enthusiast

Hi David,

Thanks for raising this issue. Are you installing ydk core under virtualenv? I found a similar issue here, and the suggested approach is to "Running pip install --upgrade pip within virtualenv fixed this issue.". Would this help for this issue?

This didn't help fix the pyang compilation issue but I was able to clear some of the warnings during the compilation by executing the following after a warning with the new pip wheel I installed.

sudo -H pip install --no-index --find-links=/home/id22/Desktop/pywrapperetc/ /home/id22/Desktop/ydk-py-master/core/dist/ydk-0.5.2.tar.gz

Other sites offer that since we are using the virtual environment that I should not have to sudo.


I can now execute

pip install --no-index --find-links=/home/id22/Desktop/pywrapperetc/ /home/id22/Desktop/ydk-py-master/core/dist/ydk-0.5.2.tar.gz

some of the other pyang type messages point to bad pointers in the distribution, I just don't know.

Attached the latest log. Any assistance is appreciated, still have the same problem but solved another one with sudo -H

This ended up being the solution. I had to go into the pyang tar file (used the tar and not the wheel) and edit per the link that you sent. I was actually able to do this in Ubuntu which actually repacked it then it automagically then it all worked well. I did not try the wheel so it is possible that it was fixed in the wheel but not the tar. here

I have this issue trying to pip install on my macbook pro in a virtualenvwrapper. This is what I discovered:

There seems to be a problem with in pyang setup.py. I added the correct path to pyang in the pyang setup.py data_files and it worked.

Changed From:
data_files=[
('share/man/man1', man1),
('share/yang/modules/iana', modules_iana),
('share/yang/modules/ietf', modules_ietf),
('share/yang/xslt', xslt),
('share/yang/images', images),
('share/yang/schema', schema),
('etc/bash_completion.d', ['etc/bash_completion.d/pyang']),
]
)
To:
data_files=[
('share/man/man1', man1),
('share/yang/modules/iana', modules_iana),
('share/yang/modules/ietf', modules_ietf),
('share/yang/xslt', xslt),
('share/yang/images', images),
('share/yang/schema', schema),
#('etc/bash_completion.d', ['etc/bash_completion.d/pyang']),
('etc/bash_completion.d', ['bin/pyang']),
]
)


~

saalvare
Cisco Employee
Cisco Employee

It'd great if you can share the details on OS and version you're using.

Ubuntu 14.04 LTS