3

と をインストールeasy_installsetuptoolsましたPython 2.7pipを使用してインストール中に悪夢を見ていeasy_install pipます。私は SO の投稿とブログをフォローしましたが、まだ助けにはなりません。

以下は、Windows で受け取るエラーですcmd

Searching for pip
Reading http://pypi.python.org/simple/pip/
Download error: [Errno 10061] No connection could be made because the target mac
hine actively refused it -- Some packages may not be found!
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
Download error: [Errno 10061] No connection could be made because the target mac
hine actively refused it -- Some packages may not be found!
No local packages or download links found for pip
Best match: None
Traceback (most recent call last):
  File "C:\Python27\Scripts\easy_install-script.py", line 8, in <module>
    load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
  File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
1712, in main
    with_ei_usage(lambda:
  File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
1700, in with_ei_usage
    return f()
  File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
1716, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "C:\Python27\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
211, in run
    self.easy_install(spec, not self.no_deps)
  File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
434, in easy_install
    self.local_index
  File "C:\Python27\lib\site-packages\setuptools\package_index.py", line 475, in
 fetch_distribution
    return dist.clone(location=self.download(dist.location, tmpdir))
AttributeError: 'NoneType' object has no attribute 'clone'
4

3 に答える 3

2

私はWindows 7 x64で作業しています。

                        Installing Python 2.7

https://www.python.org/download/releases/2.7.2 --------Windows x86 MSI インストーラー (2.7.2) (sig)

Python 2.7 をインストールしたら (デフォルトで c:\python27 にインストールしました)、準備完了です。

                           **Installing PIP:**

ファイル get-pip.py をダウンロードします。

https://raw.github.com/pypa/pip/master/contrib/get-pip.py

既知のフォルダに保存します: c:\pip\

Windows に移動 - ファイル名を指定して実行 - cmd.exe と入力します。

内部 cmd.exe タイプ:

cd c:\python27 (または python をインストールしたルート)

これが表示されます:

c:\python27

ここで入力します (get-pip.py ケース c:\pip を保存したルートを覚えておいてください)。

c:\python27\ python.exe c:\pip\get-pip.py

ピップがインストールされます。

                       Using Pip to Install Django 

PythonとPipがインストールされた状態で、Windowsに移動-実行-cmd.exeと入力します

内部 cmd.exe タイプ:

cd c:\python27

これが表示されます:

c:\python27

今入力

python.exe -m pip インストール xxxxxxx

Pip は、xxxxxx の必要なパッケージをインストールします。

例: pip install Django==1.6.2

注: このガイドは、PYTHON と WINDOWS のまったくの初心者向けです。

よろしく

erick.alfaro@adtein.com www.adtein.com

于 2014-04-19T16:10:50.357 に答える
1

あなたの試みの間に、あなたはどういうわけかあなたのPythonセットアップを台無しにしたと思います。python.orgのCPythonインストーラーだけで動作させることができると確信していますが(私や他の多くの人がこれを行いました)、最初からやり直して(これまでに持っていたものをきれいに削除して)、Pythonディストリビューションの1つをインストールすることを強くお勧めしますたとえば、次のような機能があります。

それらには、pipを含むいくつかの追加パッケージがインストールされています。彼らのインストーラーはまた、WindowsPATHを適切に設定します。したがって、インストーラーを実行した後は、先に進んで開始cmd.exeして実行するpythonか、pip install ...

EPDの無料版はここにあります。私自身、EPDだけでなく、Python(x、y)でも良い経験をしました。これは、標準のPython(x、y)インストーラーが提供する「プラグイン」のリストですWindowsの場合、EPDとPython(x、y)はどちらも32ビットバージョンとしてのみ使用可能です...ただし、Windows 64ビット用のActivePythonは無料です(PyPMパッケージは64ビット用に無料ではありません)。ニーズによっては、これは問題にならない場合があります。

于 2013-02-27T08:41:51.487 に答える