cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1755
Views
15
Helpful
9
Replies
Highlighted
Cisco Employee

Devnet express for DNA: pip install ncclient failure in windows 10

In Devnet express for DNA -> Pre-Event Preparation -> page 2 -> Windows -> "Install the ncclient package into the virtual environment"

It shows duplication "pip install requests" (see the attachment)

And I got the following failure on Window 10 when doing "pip install ncclient" ... any clue?? (see the attachment)

Everyone's tags (4)
9 REPLIES 9
Hall of Fame Cisco Employee

Re: Devnet express for DNA: pip install ncclient failure in windows 10

Seems like a known error:

https://github.com/ncclient/ncclient/issues/149

My gut tells me this has to do with your machine's locale.  Can you try setting your machine's locale to US English and see if it installs?

Cisco Employee

Re: Devnet express for DNA: pip install ncclient failure in windows 10

Hi Joseph,

Checked my country region setting, it is set to "United State" but still not working.

Chris.

Hall of Fame Cisco Employee

Re: Devnet express for DNA: pip install ncclient failure in windows 10

Hmmm.  Can you try this attached setup.py?  You'll need to download ncclient 0.5.2 and use "python setup.py install" to install.  Seems like a unicode/Windows issue.

Cisco Employee

Re: Devnet express for DNA: pip install ncclient failure in windows 10

Hi Joseph,

Still not working….

(mycode) C:\Users\yitung\Downloads>python setup.py ncclient-0.5.2.tar.gz

Traceback (most recent call last):

File "setup.py", line 28, in

req_lines = [line.strip() for line in open("requirements.txt").readlines()]

FileNotFoundError: No such file or directory: 'requirements.txt'

Chris Tung

SYSTEMS ENGINEER.SALES

yitung@cisco.com<mailto:yitung@cisco.com>

Tel: +852 2588 4968

Cisco Systems, Inc.

Great Eagle Centre 23 Harbour Road, Wan Chai

HONG KONG

0

Hong Kong

cisco.com

Think before you print.

This email may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

Please click here<http://www.cisco.com/web/about/doing_business/legal/cri/index.html> for Company Registration Information.

Hall of Fame Cisco Employee

Re: Devnet express for DNA: pip install ncclient failure in windows 10

You need to extract ncclient-0.5.2.tar.gz and replace the setup.py file within the resulting directory with the one I provided.  Then run "python setup.py install" from within that directory.

Cisco Employee

Re: Devnet express for DNA: pip install ncclient failure in windows 10

Hi Joseph,

I found that the root cause is some characters not recognized in utf-8 in the README.rst. (see the attachment)

When I save the file into windows default encoding, it can get thru the problem.

However, now I do face another issue that I need libxml2 and libxslt to get lxml install and then get ncclient install…

Should these procedure be mentioned in the module where I can get these modules installed?

Thanks a lot!!

Chris Tung

SYSTEMS ENGINEER.SALES

yitung@cisco.com<mailto:yitung@cisco.com>

Tel: +852 2588 4968

Cisco Systems, Inc.

Great Eagle Centre 23 Harbour Road, Wan Chai

HONG KONG

0

Hong Kong

cisco.com

Think before you print.

This email may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

Please click here<http://www.cisco.com/web/about/doing_business/legal/cri/index.html> for Company Registration Information.

Hall of Fame Cisco Employee

Re: Devnet express for DNA: pip install ncclient failure in windows 10

Yes, that's what my new setup.py was supposed to fix.  Changing the README is fine, too.

Pip will auto-install the missing packages.  So if you could use pip, you should get everything you need.  Since you need this hack, I think you can use "pip install \path\to\ncclient-0.5.2".  That should pull down the requirements, too.

Cisco Employee

Re: Devnet express for DNA: pip install ncclient failure in windows 10

Thanks Joseph!!

auto-install can't help in this case. ncclient requires lxml. And lxml requires libxml2 and xslt-config which seems not module.

Therefore, I will get error like the following.

Finally, after some google search, I need to download the lxml whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml

Then ncclient can be installed properly now.

These are important steps to get ncclient installed in windows.. It should be well-documented in the track.

Error after "python setup.py install" for ncclient

===============================================

Installed c:\users\yitung\mycode\lib\site-packages\ncclient-0.5.2-py3.5.egg

Processing dependencies for ncclient==0.5.2

Searching for lxml>=3.3.0

Reading https://pypi.python.org/simple/lxml/

Downloading https://pypi.python.org/packages/4f/3f/cf6daac551fc36cddafa1a71ed48ea5fd642e5feabd3a0d83b8c3dfd0cb4/lxml-3.6.4.tar.gz#md5=6dd7314233029d9dab0156e7b1c7830b

Best match: lxml 3.6.4

Processing lxml-3.6.4.tar.gz

Writing C:\Users\yitung\AppData\Local\Temp\easy_install-vclklmy1\lxml-3.6.4\setup.cfg

Running lxml-3.6.4\setup.py -q bdist_egg --dist-dir C:\Users\yitung\AppData\Local\Temp\easy_install-vclklmy1\lxml-3.6.4\egg-dist-tmp-f3jxm1sb

Building lxml version 3.6.4.

Building without Cython.

ERROR: b"'xslt-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt

cl : Command line warning D9025 : overriding '/W3' with '/w'

lxml.etree.c

src\lxml\includes\etree_defs.h(14): fatal error C1083: Cannot open include file: 'libxml/xmlversion.h': No such file or directory

Compile failed: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

xmlXPathInitqmc41pi7.c

C:\Users\yitung\AppData\Local\Temp\easy_install-vclklmy1\lxml-3.6.4\temp\xmlXPathInitqmc41pi7.c(1): fatal error C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory

*********************************************************************************

Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?

*********************************************************************************

error: Setup script exited with error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

Hall of Fame Cisco Employee

Re: Devnet express for DNA: pip install ncclient failure in windows 10

Ah, yes.  I'm so used to the Mac.  lxml needs to be compiled, and that happens for me on the Mac.  And the steps for Mac usually involve using homebrew and installing libxslt and libxml2.  Thanks for the update.  I'm glad you got this working.

Content for Community-Ad
August's Community Spotlight Awards