[Ironpython-users] Error installing package with pip

Agustín Villavedra avillavedra at ccc.com.uy
Wed Jun 10 19:24:43 CEST 2015


Hello everyone,
I posted this on github and got no answers, I found a similar posting 
here from January 
(https://mail.python.org/pipermail/ironpython-users/2015-January/017391.html) 
where no solution is mentioned so here I am.
I get an error when I try to install a package via pip.
I use ironpython 2.7.5 and tested on several PC, all windows.



Copied from https://github.com/IronLanguages/main/issues/1203

I'm new to Python so this might be something I'm doing wrong, but I'm 
having the following problem:
I installed iron Python 2.7.5, and then installed pip with|ipy.exe 
-X:Frames -m ensurepip|
So far everything works fine, but when I tried to install packages it 
didn't work.

Any help is appreciated, following is a detailed description.

I installed Ironpython on WinXP for the first time, then ensurepip, and 
tried getting pyvisa without success. Then went to a basic pip package 
as shown in the release info but it's not working.
Executing the line|ipy.exe -X:Frames -m pip install html5lib|gives me an 
error as follows:

|   File "C:\Archivos de programa\IronPython 2.7\lib\site-packages\pip\_vendor\requests\packages\urllib3\packages\ssl_match_hostname\_implementation.py", line 88, in match_hostname
     for key, value in sub:
ValueError: too many values to unpack
|

After digging a bit the problem is that the following code

|sub = ('txt1','txt2')
for key,value in sub:
    print key,value
|

gives the error

|File "<stdin>", line 1, in <module>
ValueError: too many values to unpack
|

I don't understand why this happens, any ideas?

After this was detected, if I modify _implementation.py to work around 
this error, I get a new error which I don't get. The log file follows:

|------------------------------------------------------------
C:\Archivos de programa\IronPython 2.7\lib\site-packages\pip\__main__.py run on 05/20/15 18:02:52
Downloading/unpacking html5lib
   Getting page https://pypi.python.org/simple/html5lib/
   Could not fetch URL https://pypi.python.org/simple/html5lib/: connection error: hostname 'pypi.python.org' doesn't match 'www.python.org'
   Will skip URL https://pypi.python.org/simple/html5lib/ when looking for download links for html5lib
   Getting page https://pypi.python.org/simple/
   Could not fetch URL https://pypi.python.org/simple/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/ (Caused by <class 'httplib.CannotSendRequest'>: )
   Will skip URL https://pypi.python.org/simple/ when looking for download links for html5lib
   Cannot fetch index base URL https://pypi.python.org/simple/
   URLs to search for versions for html5lib:
   * https://pypi.python.org/simple/html5lib/
   Getting page https://pypi.python.org/simple/html5lib/
   Could not fetch URL https://pypi.python.org/simple/html5lib/: connection error: hostname 'pypi.python.org' doesn't match 'www.python.org'
   Will skip URL https://pypi.python.org/simple/html5lib/ when looking for download links for html5lib
   Could not find any downloads that satisfy the requirement html5lib
Cleaning up...
   Removing temporary dir c:\documents and settings\agustin\configuración local\temp\pip_build_agustin...
No distributions at all found for html5lib
Exception information:
Traceback (most recent call last):
   File "C:\Archivos de programa\IronPython 2.7\lib\site-packages\pip\basecommand.py", line 122, in main
     status = self.run(options, args)
   File "C:\Archivos de programa\IronPython 2.7\lib\site-packages\pip\commands\install.py", line 278, in run
     requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
   File "C:\Archivos de programa\IronPython 2.7\lib\site-packages\pip\req.py", line 1183, in prepare_files
     url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
   File "C:\Archivos de programa\IronPython 2.7\lib\site-packages\pip\index.py", line 277, in find_requirement
     raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for html5lib
|

It seems the server is reporting the wrong hostname?
Anyone knows what's happening here?


-- 
Agustín Villavedra
R&D Department
CCC del Uruguay SA                 Phone:  598 2 600 7629
General Paz 1371                   Fax:    598 2 601 6286
Montevideo 11400                   E-mail: avillavedra at ccc.com.uy
Uruguay                            WWW:    http://www.ccc.com.uy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20150610/fbef183a/attachment.html>


More information about the Ironpython-users mailing list