ダウンロードしてインストールscrapy

私は人が死んでピットがインストールされていないscrapyよ教えてください

インストールscrapy

python3.7、win10

図1は、車輪をダウンロード、pycharm Iは、直接ダウンロードを設定したの両方をねじら

ダウンロードpywin32

1、私が使用pycharm pywin32インストールが動作しないとのみ対応バージョンpython3.7、Pythonのサイトのパッケージファイルの下に置かれ、ダウンロードpywin32をダウンロードするには、公式ウェブサイトに行くことができます

2、pywin32ダウンロード:https://sourceforge.net/projects/pywin32/files/pywin32/Build%20221/

図3は、インストールpywin32は次あったが、次のように報告し、解決したときに、私は次のエラーを取得します:

    -Python version 3.7 required, which was not found in the registry

上記のエラーを解決し、新しいファイルregister.pyを作成し、同じディレクトリに彼とpywin32を入れて、次のコードに掲載:

from __future__ import print_function
 
 
import sys
 
try:
    from winreg import *
except ImportError:
    from _winreg import *
 
# tweak as necessary
version = sys.version[:3]
installpath = sys.prefix
 
regpath = "SOFTWARE\\Python\\Pythoncore\\{0}\\".format(version)
installkey = "InstallPath"
pythonkey = "PythonPath"
pythonpath = "{0};{1}\\Lib\\;{2}\\DLLs\\".format(
    installpath, installpath, installpath)
 
 
def RegisterPy():
    try:
        reg = OpenKey(HKEY_CURRENT_USER, regpath)
    except EnvironmentError as e:
        try:
            reg = CreateKey(HKEY_CURRENT_USER, regpath)
            SetValue(reg, installkey, REG_SZ, installpath)
            SetValue(reg, pythonkey, REG_SZ, pythonpath)
            CloseKey(reg)
        except:
            print("*** Unable to register!")
            return
        print("--- Python", version, "is now registered!")
        return
    if (QueryValue(reg, installkey) == installpath and
        QueryValue(reg, pythonkey) == pythonpath):
        CloseKey(reg)
        print("=== Python", version, "is already registered!")
        return
    CloseKey(reg)
    print("*** Unable to register!")
    print("*** You probably have another Python installation!")
 
if __name__ == "__main__":
    RegisterPy()

cmdと入力して保存した後、pywin32をインストールするために再実行exeファイルにPythonのregisted.pyを実行し、PYファイルを格納するディレクトリに切り替えます。

pytcharmでscrapyをダウンロード

1、ダウンロードしたファイルは、私がscrapy-1.7.3.dist-情報、scrapyに手を入れScrapyです

2、構成環境変数パスscrapy

おすすめ

転載: www.cnblogs.com/venvive/p/11682116.html