1

I keep getting the error "Python pip command returning 'Command "python setup.py egg_info" failed with error code1'" when trying to install PyEZ/junos-eznc for some reason. My setuptool and ez-setup are all up to date. Here is a snap of the error:

C:\Users\???>py -m pip install junos-eznc
Collecting junos-eznc
  Using cached junos-eznc-1.3.1.tar.gz
Collecting lxml>=3.2.4 (from junos-eznc)
  Using cached lxml-3.6.1.tar.gz
Collecting ncclient>=0.4.6 (from junos-eznc)
  Using cached ncclient-0.5.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\???~1\AppData\Local\Temp\pip-build-bb5l5lel\ncclient\setup.py", line 32, in <mod
ule>
        long_description = file.read()
      File "C:\Users\???\AppData\Local\Programs\Python\Python35-32\lib\encodings\cp1252.py", line
23, in decode
        return codecs.charmap_decode(input,self.errors,decoding_table)[0]
    UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 4336: character maps to <unde
fined>

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\???~1\AppData\Local\Temp\pip-
build-bb5l5lel\ncclient/

Any thoughts?

4
  • Could you run pip -V and python -V, please? Commented Jul 31, 2016 at 9:46
  • Your username in the path looks strange. Does it contain non ASCII characters? I've seen pip failing when the working directory path contained special characters before. Commented Jul 31, 2016 at 9:56
  • @Aurora0001 pip 8.1.2, python 3.5. Commented Jul 31, 2016 at 12:06
  • @KlausD.I omitted my username from the path, no problems there :P. Commented Jul 31, 2016 at 12:06

2 Answers 2

2

It looks like the issue is that the description in ncclient's setup.py file is being loaded in the wrong encoding. A few other packages seem to have similar issues like the one here, so I suggest you try this:

  • Download and unzip the latest version directly from PyPI.

  • Delete lines 31 and 32 from setup.py.

  • Replace it with the following line:


long_description = "Placeholder"
  • Open a command line prompt, cd to the directory where you extracted the code and run py -m pip install .

It might also be helpful if you file an issue on ncclient's GitHub page - it might help them if you link this thread if this solves the problem.

Sign up to request clarification or add additional context in comments.

Comments

0

Finally found a solution for this problem.

Step 1) As Aurora0001 stated, download zip file, delete lines 31 and 32 and replace with:

long_description = "Placeholder"

then, use pip to install.

Step 2) execute this command:

set STATICBUILD=true && pip install lxml

Step 3) install junos-eznc using pip

I hope it works for everyone else that has the same problem; and thank you Aurora.

1 Comment

Glad to hear your problem's solved. Don't forget to accept one of the solutions on this answer (either mine or this one).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.