<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello everyone,<br>
I posted this on github and got no answers, I found a similar
posting here from January
(<a class="moz-txt-link-freetext" href="https://mail.python.org/pipermail/ironpython-users/2015-January/017391.html">https://mail.python.org/pipermail/ironpython-users/2015-January/017391.html</a>)
where no solution is mentioned so here I am.<br>
I get an error when I try to install a package via pip.<br>
I use ironpython 2.7.5 and tested on several PC, all windows.<br>
<br>
<br>
<br>
Copied from <a class="moz-txt-link-freetext" href="https://github.com/IronLanguages/main/issues/1203">https://github.com/IronLanguages/main/issues/1203</a><br>
<br>
<p style="box-sizing: border-box; margin-top: 0px !important;
margin-bottom: 16px; color: rgb(51, 51, 51); font-family:
'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans,
sans-serif; font-size: 14px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
22.3999996185303px; orphans: auto; text-align: start; text-indent:
0px; text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">I'm new to Python so this
might be something I'm doing wrong, but I'm having the following
problem:<br style="box-sizing: border-box;">
I installed iron Python 2.7.5, and then installed pip with<span
class="Apple-converted-space"> </span><code style="box-sizing:
border-box; font-family: Consolas, 'Liberation Mono', Menlo,
Courier, monospace; font-size: 11.8999996185303px; padding:
0.2em 0px; margin: 0px; border-radius: 3px; background-color:
rgba(0, 0, 0, 0.0392157);">ipy.exe -X:Frames -m ensurepip</code><br
style="box-sizing: border-box;">
So far everything works fine, but when I tried to install packages
it didn't work.</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom:
16px; color: rgb(51, 51, 51); font-family: 'Helvetica Neue',
Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size:
14px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 22.3999996185303px;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">Any help is appreciated,
following is a detailed description.</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom:
16px; color: rgb(51, 51, 51); font-family: 'Helvetica Neue',
Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size:
14px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 22.3999996185303px;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">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.<br style="box-sizing:
border-box;">
Executing the line<span class="Apple-converted-space"> </span><code
style="box-sizing: border-box; font-family: Consolas,
'Liberation Mono', Menlo, Courier, monospace; font-size:
11.8999996185303px; padding: 0.2em 0px; margin: 0px;
border-radius: 3px; background-color: rgba(0, 0, 0, 0.0392157);">ipy.exe
-X:Frames -m pip install html5lib</code><span
class="Apple-converted-space"> </span>gives me an error as
follows:</p>
<pre style="box-sizing: border-box; overflow: auto; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 11.8999996185303px; margin-top: 0px; margin-bottom: 16px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; line-height: 1.45; padding: 16px; border-radius: 3px; word-wrap: normal; color: rgb(51, 51, 51); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(247, 247, 247);"><code style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 11.8999996185303px; padding: 0px; margin: 0px; border-radius: 3px; word-break: normal; white-space: pre; border: 0px; display: inline; max-width: initial; overflow: initial; line-height: inherit; word-wrap: normal; background: transparent;"> 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
</code></pre>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom:
16px; color: rgb(51, 51, 51); font-family: 'Helvetica Neue',
Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size:
14px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 22.3999996185303px;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">After digging a bit the
problem is that the following code</p>
<pre style="box-sizing: border-box; overflow: auto; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 11.8999996185303px; margin-top: 0px; margin-bottom: 16px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; line-height: 1.45; padding: 16px; border-radius: 3px; word-wrap: normal; color: rgb(51, 51, 51); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(247, 247, 247);"><code style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 11.8999996185303px; padding: 0px; margin: 0px; border-radius: 3px; word-break: normal; white-space: pre; border: 0px; display: inline; max-width: initial; overflow: initial; line-height: inherit; word-wrap: normal; background: transparent;">sub = ('txt1','txt2')
for key,value in sub:
print key,value
</code></pre>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom:
16px; color: rgb(51, 51, 51); font-family: 'Helvetica Neue',
Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size:
14px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 22.3999996185303px;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">gives the error</p>
<pre style="box-sizing: border-box; overflow: auto; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 11.8999996185303px; margin-top: 0px; margin-bottom: 16px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; line-height: 1.45; padding: 16px; border-radius: 3px; word-wrap: normal; color: rgb(51, 51, 51); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(247, 247, 247);"><code style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 11.8999996185303px; padding: 0px; margin: 0px; border-radius: 3px; word-break: normal; white-space: pre; border: 0px; display: inline; max-width: initial; overflow: initial; line-height: inherit; word-wrap: normal; background: transparent;">File "<stdin>", line 1, in <module>
ValueError: too many values to unpack
</code></pre>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom:
16px; color: rgb(51, 51, 51); font-family: 'Helvetica Neue',
Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size:
14px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 22.3999996185303px;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">I don't understand why this
happens, any ideas?</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom:
16px; color: rgb(51, 51, 51); font-family: 'Helvetica Neue',
Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size:
14px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 22.3999996185303px;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">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:</p>
<pre style="box-sizing: border-box; overflow: auto; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 11.8999996185303px; margin-top: 0px; margin-bottom: 16px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; line-height: 1.45; padding: 16px; border-radius: 3px; word-wrap: normal; color: rgb(51, 51, 51); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(247, 247, 247);"><code style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 11.8999996185303px; padding: 0px; margin: 0px; border-radius: 3px; word-break: normal; white-space: pre; border: 0px; display: inline; max-width: initial; overflow: initial; line-height: inherit; word-wrap: normal; background: transparent;">--------------------------------------------------------!
----
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 <a class="moz-txt-link-freetext" href="https://pypi.python.org/simple/html5lib/">https://pypi.python.org/simple/html5lib/</a>
Could not fetch URL <a class="moz-txt-link-freetext" href="https://pypi.python.org/simple/html5lib/">https://pypi.python.org/simple/html5lib/</a>: connection error: hostname 'pypi.python.org' doesn't match '<a class="moz-txt-link-abbreviated" href="http://www.python.org">www.python.org</a>'
Will skip URL <a class="moz-txt-link-freetext" href="https://pypi.python.org/simple/html5lib/">https://pypi.python.org/simple/html5lib/</a> when looking for download links for html5lib
Getting page <a class="moz-txt-link-freetext" href="https://pypi.python.org/simple/">https://pypi.python.org/simple/</a>
Could not fetch URL <a class="moz-txt-link-freetext" href="https://pypi.python.org/simple/">https://pypi.python.org/simple/</a>: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/ (Caused by <class 'httplib.CannotSendRequest'>: )
Will skip URL <a class="moz-txt-link-freetext" href="https://pypi.python.org/simple/">https://pypi.python.org/simple/</a> when looking for download links for html5lib
Cannot fetch index base URL <a class="moz-txt-link-freetext" href="https://pypi.python.org/simple/">https://pypi.python.org/simple/</a>
URLs to search for versions for html5lib:
* <a class="moz-txt-link-freetext" href="https://pypi.python.org/simple/html5lib/">https://pypi.python.org/simple/html5lib/</a>
Getting page <a class="moz-txt-link-freetext" href="https://pypi.python.org/simple/html5lib/">https://pypi.python.org/simple/html5lib/</a>
Could not fetch URL <a class="moz-txt-link-freetext" href="https://pypi.python.org/simple/html5lib/">https://pypi.python.org/simple/html5lib/</a>: connection error: hostname 'pypi.python.org' doesn't match '<a class="moz-txt-link-abbreviated" href="http://www.python.org">www.python.org</a>'
Will skip URL <a class="moz-txt-link-freetext" href="https://pypi.python.org/simple/html5lib/">https://pypi.python.org/simple/html5lib/</a> 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
</code></pre>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom:
0px !important; color: rgb(51, 51, 51); font-family: 'Helvetica
Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif;
font-size: 14px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
22.3999996185303px; orphans: auto; text-align: start; text-indent:
0px; text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">It seems the server is
reporting the wrong hostname?<br style="box-sizing: border-box;">
Anyone knows what's happening here?</p>
<br>
<pre class="moz-signature" cols="72">--
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: <a class="moz-txt-link-abbreviated" href="mailto:avillavedra@ccc.com.uy">avillavedra@ccc.com.uy</a>
Uruguay WWW: <a class="moz-txt-link-freetext" href="http://www.ccc.com.uy">http://www.ccc.com.uy</a>
</pre>
</body>
</html>