1

I have just installed Python 2.6.6 64-bit. I first had problems on Python command line because of an encoding bug which I think I solved it based on instructions mentioned in: Windows command line encoding causes Python crash. Then I tried to install pip using admin's Windows powershell after reading instructions provided in: How to install Python pip and PyPA pip installation manual. It failed and I received this in shell:

    Exception:
Traceback (most recent call last):
  File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\commands\install.py", line 324, in run
    requirement_set.prepare_files(finder)
  File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\req\req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\req\req_set.py", line 620, in _prepare_file
    session=self.session, hashes=hashes)
  File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\download.py", line 821, in unpack_url
    hashes=hashes
  File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\download.py", line 659, in unpack_http_url
    hashes)
  File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\download.py", line 882, in _download_http_url
    _download_url(resp, link, content_file, hashes)
  File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\download.py", line 603, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
  File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\utils\hashes.py", line 46, in check_against_chunks
    for chunk in chunks:
  File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\download.py", line 571, in written_chunks
    for chunk in chunks:
  File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\utils\ui.py", line 141, in iter
    self.next(n)
  File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\_vendor\progress\__init__.py", line 73, in next
    self.update()
  File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\_vendor\progress\bar.py", line 79, in update
    self.writeln(line)
  File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\_vendor\progress\helpers.py", line 68, in writeln
    print(line, end='', file=self.file)
  File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\_vendor\colorama\ansitowin32.py", line 141, in write
    self.write_and_convert(text)
  File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\_vendor\colorama\ansitowin32.py", line 169, in write_and_
convert
    self.write_plain_text(text, cursor, len(text))
  File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\_vendor\colorama\ansitowin32.py", line 174, in write_plai
n_text
    self.wrapped.write(text[start:end])
UnicodeEncodeError: 'ascii' codec can't encode character u'\u258e' in position 8: ordinal not in range(128)

Then I tried to install setuptools easy_install after reading the same source and PyPA setuptools installation manual using powershell. It failed again and I received this:

Exception calling "DownloadFile" with "2" argument(s): "The underlying connection was closed: An unexpected error occur
red on a send."
At line:1 char:152
+ [System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials; (new-object
System.Net.WebClient).DownloadFile <<<< ("https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip", "C:\setu
ptools-33.1.1.zip")
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

Traceback (most recent call last):
  File "ez_setup.py", line 414, in <module>
    sys.exit(main())
  File "ez_setup.py", line 410, in main
    archive = download_setuptools(**_download_args(options))
  File "ez_setup.py", line 355, in download_setuptools
    downloader(url, saveto)
  File "ez_setup.py", line 256, in download_file_powershell
    _clean_check(cmd, target)
  File "ez_setup.py", line 230, in _clean_check
    subprocess.check_call(cmd)
  File "c:\Python26\lib\subprocess.py", line 488, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['powershell', '-Command', '[System.Net.WebRequest]::DefaultWebProxy.Credentials
 = [System.Net.CredentialCache]::DefaultCredentials; (new-object System.Net.WebClient).DownloadFile("https://pypi.io/pac
kages/source/s/setuptools/setuptools-33.1.1.zip", "C:\\setuptools-33.1.1.zip")']' returned non-zero exit status 1

How can it be fixed?

Vynylyn
  • 145
  • 10

0 Answers0