webmaster-kazu.com

テクノロジー・データ分析・実践ログ・その他

【Python】Instagramのいいね、コメントなどを自動化する「instapy」のインストール

カテゴリ: Python【初歩から現場実務的なもの】

【Python】Instagramのいいね、コメントなどを自動化する「instapy」のインストールについて解説しています。

「instapy(https://github.com/InstaPy/InstaPy)」は、Instagram インタラクションを自動化するツール、ライブラリです。インタラクションとは相互作用、やり取りという意味です。

■Python

今回のPythonのバージョンは、「3.9.9」を使用しています。(Windows11)(pythonランチャーでの確認)

■InstaPyをインストールする

InstaPyをインストールを行いますが、今回はpipを経由してインストールを行うので、まずWindowsのコマンドプロンプトを起動します。

pip install instapy

起動後、上記のコマンドを入力し、Enterキーを押します。

なお、今回は、pythonランチャーを使用しており、Python Version 3.9.9にインストールを行うために、バージョンの切り替えを行います。

py -3.9 -m pip install instapy

切り替えるために、上記のコマンドを入力し、Enterキーを押します。

Defaulting to user installation because normal site-packages is not writeable

Collecting instapy

Downloading instapy-0.6.16-py2.py3-none-any.whl (246 kB)

|████████████████████████████████| 246 kB 1.6 MB/s

Collecting idna<3,>=2.7

Downloading idna-2.10-py2.py3-none-any.whl (58 kB)

|████████████████████████████████| 58 kB 4.1 MB/s

Collecting regex>=2018.11.22

Downloading regex-2023.8.8-cp39-cp39-win_amd64.whl (268 kB)

|████████████████████████████████| 268 kB 6.8 MB/s

Collecting emoji>=0.5.1

Downloading emoji-2.8.0-py2.py3-none-any.whl (358 kB)

|████████████████████████████████| 358 kB ...

Collecting plyer>=1.3.1

Downloading plyer-2.1.0-py2.py3-none-any.whl (142 kB)

|████████████████████████████████| 142 kB 3.2 MB/s

Collecting PyYAML>=3.13

Downloading PyYAML-6.0.1-cp39-cp39-win_amd64.whl (152 kB)

|████████████████████████████████| 152 kB 6.4 MB/s

Collecting setuptools-rust>=0.11.6

Downloading setuptools_rust-1.7.0-py3-none-any.whl (25 kB)

Collecting urllib3>=1.24.1

Using cached urllib3-2.0.4-py3-none-any.whl (123 kB)

Collecting selenium>=3.141.0

Downloading selenium-4.12.0-py3-none-any.whl (9.4 MB)

|████████████████████████████████| 9.4 MB 6.4 MB/s

Collecting python-telegram-bot>=12.0.0

Downloading python_telegram_bot-20.4-py3-none-any.whl (549 kB)

|████████████████████████████████| 549 kB 1.1 MB/s

Collecting clarifai>=2.4.1

Downloading clarifai-9.7.6-py3-none-any.whl (2.4 MB)

|████████████████████████████████| 2.4 MB 3.3 MB/s

Collecting webdriverdownloader>=1.1.0.3

Downloading webdriverdownloader-1.1.0.3-py2.py3-none-any.whl (10 kB)

Collecting chardet<4,>=3.0.4

Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)

|████████████████████████████████| 133 kB 6.4 MB/s

Collecting protobuf<4,>=3.6.1

Downloading protobuf-3.20.3-cp39-cp39-win_amd64.whl (904 kB)

|████████████████████████████████| 904 kB ...

Collecting MeaningCloud-python>=1.1.1

Downloading MeaningCloud_python-2.0.0-py2.py3-none-any.whl (21 kB)

Collecting grpcio>=1.16.1

Downloading grpcio-1.57.0-cp39-cp39-win_amd64.whl (4.3 MB)

|████████████████████████████████| 4.3 MB 6.8 MB/s

Collecting EasyProcess>=0.2.3

Downloading EasyProcess-1.1-py3-none-any.whl (8.7 kB)

Collecting six>=1.11.0

Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)

Collecting certifi>=2018.10.15

Using cached certifi-2023.7.22-py3-none-any.whl (158 kB)

Collecting configparser<4,>=3.5.0

Downloading configparser-3.8.1-py2.py3-none-any.whl (22 kB)

Collecting api-display-purposes>=0.0.3

Downloading api_display_purposes-0.0.3-py3-none-any.whl (4.7 kB)

Collecting requests>=2.20.1

Using cached requests-2.31.0-py3-none-any.whl (62 kB)

Collecting jsonschema<3,>=2.6.0

Downloading jsonschema-2.6.0-py2.py3-none-any.whl (39 kB)

Collecting future>=0.17.1

Downloading future-0.18.3.tar.gz (840 kB)

|████████████████████████████████| 840 kB ...

Collecting packaging

Using cached packaging-23.1-py3-none-any.whl (48 kB)

Collecting tritonclient==2.34.0

Downloading tritonclient-2.34.0-py3-none-any.whl (94 kB)

|████████████████████████████████| 94 kB 1.2 MB/s

Collecting rich==13.4.2

Downloading rich-13.4.2-py3-none-any.whl (239 kB)

|████████████████████████████████| 239 kB 6.8 MB/s

Collecting clarifai-grpc>=9.7.4

Downloading clarifai_grpc-9.7.6-py3-none-any.whl (215 kB)

|████████████████████████████████| 215 kB 6.8 MB/s

Collecting tqdm==4.64.1

Downloading tqdm-4.64.1-py2.py3-none-any.whl (78 kB)

|████████████████████████████████| 78 kB 2.6 MB/s

Collecting pygments<3.0.0,>=2.13.0

Using cached Pygments-2.16.1-py3-none-any.whl (1.2 MB)

Collecting markdown-it-py>=2.2.0

Using cached markdown_it_py-3.0.0-py3-none-any.whl (87 kB)

Collecting colorama

Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)

Collecting numpy>=1.19.1

Using cached numpy-1.25.2-cp39-cp39-win_amd64.whl (15.6 MB)

Collecting python-rapidjson>=0.9.1

Downloading python_rapidjson-1.10-cp39-cp39-win_amd64.whl (146 kB)

|████████████████████████████████| 146 kB ...

Collecting googleapis-common-protos>=1.53.0

Downloading googleapis_common_protos-1.60.0-py2.py3-none-any.whl (227 kB)

|████████████████████████████████| 227 kB 6.4 MB/s

Collecting mdurl~=0.1

Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB)

Collecting httpx~=0.24.1

Using cached httpx-0.24.1-py3-none-any.whl (75 kB)

Collecting sniffio

Using cached sniffio-1.3.0-py3-none-any.whl (10 kB)

Collecting httpcore<0.18.0,>=0.15.0

Using cached httpcore-0.17.3-py3-none-any.whl (74 kB)

Collecting anyio<5.0,>=3.0

Downloading anyio-4.0.0-py3-none-any.whl (83 kB)

|████████████████████████████████| 83 kB 676 kB/s

Collecting h11<0.15,>=0.13

Using cached h11-0.14.0-py3-none-any.whl (58 kB)

Collecting exceptiongroup>=1.0.2

Using cached exceptiongroup-1.1.3-py3-none-any.whl (14 kB)

Collecting charset-normalizer<4,>=2

Using cached charset_normalizer-3.2.0-cp39-cp39-win_amd64.whl (96 kB)

Collecting trio~=0.17

Downloading trio-0.22.2-py3-none-any.whl (400 kB)

|████████████████████████████████| 400 kB 6.4 MB/s

Collecting trio-websocket~=0.9

Using cached trio_websocket-0.10.3-py3-none-any.whl (17 kB)

Collecting semantic-version<3,>=2.8.2

Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)

Collecting setuptools>=62.4

Using cached setuptools-68.1.2-py3-none-any.whl (805 kB)

Collecting tomli>=1.2.1

Using cached tomli-2.0.1-py3-none-any.whl (12 kB)

Collecting typing-extensions>=3.7.4.3

Using cached typing_extensions-4.7.1-py3-none-any.whl (33 kB)

Collecting cffi>=1.14

Downloading cffi-1.15.1-cp39-cp39-win_amd64.whl (179 kB)

|████████████████████████████████| 179 kB 6.4 MB/s

Collecting attrs>=20.1.0

Using cached attrs-23.1.0-py3-none-any.whl (61 kB)

Collecting sortedcontainers

Using cached sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB)

Collecting outcome

Using cached outcome-1.2.0-py2.py3-none-any.whl (9.7 kB)

Collecting pycparser

Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)

Collecting wsproto>=0.14

Using cached wsproto-1.2.0-py3-none-any.whl (24 kB)

Collecting pysocks!=1.5.7,<2.0,>=1.5.6

Using cached PySocks-1.7.1-py3-none-any.whl (16 kB)

Collecting beautifulsoup4

Using cached beautifulsoup4-4.12.2-py3-none-any.whl (142 kB)

Collecting soupsieve>1.2

Using cached soupsieve-2.4.1-py3-none-any.whl (36 kB)

Using legacy 'setup.py install' for future, since package 'wheel' is not installed.

Installing collected packages: sniffio, pycparser, idna, exceptiongroup, attrs, urllib3, sortedcontainers, protobuf, outcome, mdurl, h11, charset-normalizer, cffi, certifi, anyio, wsproto, trio, soupsieve, requests, python-rapidjson, pysocks, pygments, numpy, markdown-it-py, httpcore, grpcio, googleapis-common-protos, colorama, typing-extensions, tritonclient, trio-websocket, tqdm, tomli, setuptools, semantic-version, rich, packaging, httpx, clarifai-grpc, beautifulsoup4, webdriverdownloader, six, setuptools-rust, selenium, regex, PyYAML, python-telegram-bot, plyer, MeaningCloud-python, jsonschema, future, emoji, EasyProcess, configparser, clarifai, chardet, api-display-purposes, instapy

WARNING: The script normalizer.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python39\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script pygmentize.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python39\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script f2py.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python39\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script markdown-it.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python39\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script tqdm.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python39\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script httpx.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python39\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script webdriverdownloader.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python39\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script jsonschema.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python39\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Running setup.py install for future ... done

WARNING: The scripts clarifai-model-upload-init.exe, clarifai-triton-zip.exe and clarifai-upload-model.exe are installed in 'C:\Users\user_\AppData\Roaming\Python\Python39\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script chardetect.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python39\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Successfully installed EasyProcess-1.1 MeaningCloud-python-2.0.0 PyYAML-6.0.1 anyio-4.0.0 api-display-purposes-0.0.3 attrs-23.1.0 beautifulsoup4-4.12.2 certifi-2023.7.22 cffi-1.15.1 chardet-3.0.4 charset-normalizer-3.2.0 clarifai-9.7.6 clarifai-grpc-9.7.6 colorama-0.4.6 configparser-3.8.1 emoji-2.8.0 exceptiongroup-1.1.3 future-0.18.3 googleapis-common-protos-1.60.0 grpcio-1.57.0 h11-0.14.0 httpcore-0.17.3 httpx-0.24.1 idna-2.10 instapy-0.6.16 jsonschema-2.6.0 markdown-it-py-3.0.0 mdurl-0.1.2 numpy-1.25.2 outcome-1.2.0 packaging-23.1 plyer-2.1.0 protobuf-3.20.3 pycparser-2.21 pygments-2.16.1 pysocks-1.7.1 python-rapidjson-1.10 python-telegram-bot-20.4 regex-2023.8.8 requests-2.31.0 rich-13.4.2 selenium-4.12.0 semantic-version-2.10.0 setuptools-68.1.2 setuptools-rust-1.7.0 six-1.16.0 sniffio-1.3.0 sortedcontainers-2.4.0 soupsieve-2.4.1 tomli-2.0.1 tqdm-4.64.1 trio-0.22.2 trio-websocket-0.10.3 tritonclient-2.34.0 typing-extensions-4.7.1 urllib3-2.0.4 webdriverdownloader-1.1.0.3 wsproto-1.2.0

WARNING: You are using pip version 21.2.4; however, version 23.2.1 is available.

You should consider upgrading via the 'C:\Program Files\Python39\python.exe -m pip install --upgrade pip' command.

Enterキーを押すと、インストールが開始され、上記のように「Successfully installed」と表示されます。これが表示されれば、InstaPyが正常にインストールされたことになりますが、「WARNING」と表示されました。「WARNING」はエラーではなく警告で、インストールは行われているので、今回は一旦無視しています。

なお、今回はInstaPyのバージョン0.6.16をインストールしました。