学術文献検索「Google Scholar」から著者や論文の情報を取得できる「scholarly」をインストール(Python)

学術文献検索「Google Scholar」から著者や論文の情報を取得できる「scholarly」ライブラリのインストールについて解説しています。

scholarly(https://github.com/scholarly-python-package/scholarly)は、学術文献検索「Google Scholar」から著者や出版物の情報を取得することができます。

■Python

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

■scholarlyをインストールする

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

pip install scholarly

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

なお、今回は、pythonランチャーを使用しており、Python Version 3.8.5にインストールを行うために、pipを使う場合にはコマンドでの切り替えを行います。

py -3.8 -m pip install scholarly

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

Defaulting to user installation because normal site-packages is not writeable
Collecting scholarly
Downloading scholarly-1.4.1-py3-none-any.whl (29 kB)
Requirement already satisfied: selenium in c:\users\user_\appdata\roaming\python\python38\site-packages (from scholarly) (3.141.0)
Collecting arrow
Downloading arrow-1.2.0-py3-none-any.whl (62 kB)
|████████████████████████████████| 62 kB 212 kB/s
Requirement already satisfied: requests[socks] in c:\users\user_\appdata\roaming\python\python38\site-packages (from scholarly) (2.25.1)
Requirement already satisfied: PySocks in c:\users\user_\appdata\roaming\python\python38\site-packages (from scholarly) (1.7.1)
Collecting stem
Downloading stem-1.8.0.tar.gz (2.9 MB)
|████████████████████████████████| 2.9 MB 2.2 MB/s
Collecting bibtexparser
Downloading bibtexparser-1.2.0.tar.gz (46 kB)
|████████████████████████████████| 46 kB 1.2 MB/s
Requirement already satisfied: python-dotenv in c:\users\user_\appdata\roaming\python\python38\site-packages (from scholarly) (0.18.0)
Requirement already satisfied: typing-extensions in c:\users\user_\appdata\roaming\python\python38\site-packages (from scholarly) (3.7.4.3)
Collecting fake-useragent
Downloading fake-useragent-0.1.11.tar.gz (13 kB)
Collecting free-proxy
Downloading free_proxy-1.0.3.tar.gz (4.0 kB)
Requirement already satisfied: beautifulsoup4 in c:\users\user_\appdata\roaming\python\python38\site-packages (from scholarly) (4.9.3)
Collecting sphinx-rtd-theme
Downloading sphinx_rtd_theme-1.0.0-py2.py3-none-any.whl (2.8 MB)
|████████████████████████████████| 2.8 MB 6.4 MB/s
Requirement already satisfied: urllib3 in c:\users\user_\appdata\roaming\python\python38\site-packages (from selenium->scholarly) (1.26.5)
Requirement already satisfied: python-dateutil>=2.7.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from arrow->scholarly) (2.8.1)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests[socks]->scholarly) (2021.5.30)
Requirement already satisfied: idna<3,>=2.5 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests[socks]->scholarly) (2.10)
Requirement already satisfied: chardet<5,>=3.0.2 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests[socks]->scholarly) (4.0.0)
Requirement already satisfied: pyparsing>=2.0.3 in c:\users\user_\appdata\roaming\python\python38\site-packages (from bibtexparser->scholarly) (2.4.7)
Requirement already satisfied: future>=0.16.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from bibtexparser->scholarly) (0.18.2)
Requirement already satisfied: lxml in c:\users\user_\appdata\roaming\python\python38\site-packages (from free-proxy->scholarly) (4.6.3)
Requirement already satisfied: soupsieve>1.2; python_version >= “3.0” in c:\users\user_\appdata\roaming\python\python38\site-packages (from beautifulsoup4->scholarly) (2.2.1)
Collecting sphinx>=1.6
Downloading Sphinx-4.2.0-py3-none-any.whl (3.1 MB)
|████████████████████████████████| 3.1 MB 6.4 MB/s
Collecting docutils<0.18
Downloading docutils-0.17.1-py2.py3-none-any.whl (575 kB)
|████████████████████████████████| 575 kB 3.3 MB/s
Requirement already satisfied: six>=1.5 in c:\users\user_\appdata\roaming\python\python38\site-packages (from python-dateutil>=2.7.0->arrow->scholarly) (1.15.0)
Collecting snowballstemmer>=1.1
Downloading snowballstemmer-2.1.0-py2.py3-none-any.whl (93 kB)
|████████████████████████████████| 93 kB 658 kB/s
Requirement already satisfied: Jinja2>=2.3 in c:\users\user_\appdata\roaming\python\python38\site-packages (from sphinx>=1.6->sphinx-rtd-theme->scholarly) (3.0.1)
Collecting sphinxcontrib-serializinghtml>=1.1.5
Downloading sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl (94 kB)
|████████████████████████████████| 94 kB 860 kB/s
Collecting sphinxcontrib-htmlhelp>=2.0.0
Downloading sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl (100 kB)
|████████████████████████████████| 100 kB 2.9 MB/s
Collecting babel>=1.3
Downloading Babel-2.9.1-py2.py3-none-any.whl (8.8 MB)
|████████████████████████████████| 8.8 MB 6.4 MB/s
Collecting sphinxcontrib-devhelp
Downloading sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl (84 kB)
|████████████████████████████████| 84 kB 1.2 MB/s
Requirement already satisfied: Pygments>=2.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from sphinx>=1.6->sphinx-rtd-theme->scholarly) (2.9.0)
Collecting alabaster<0.8,>=0.7
Downloading alabaster-0.7.12-py2.py3-none-any.whl (14 kB)
Collecting sphinxcontrib-qthelp
Downloading sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl (90 kB)
|████████████████████████████████| 90 kB 2.7 MB/s
Collecting imagesize
Downloading imagesize-1.2.0-py2.py3-none-any.whl (4.8 kB)
Requirement already satisfied: setuptools in c:\program files\python38\lib\site-packages (from sphinx>=1.6->sphinx-rtd-theme->scholarly) (47.1.0)
Collecting sphinxcontrib-jsmath
Downloading sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl (5.1 kB)
Requirement already satisfied: packaging in c:\users\user_\appdata\roaming\python\python38\site-packages (from sphinx>=1.6->sphinx-rtd-theme->scholarly) (20.9)
Requirement already satisfied: colorama>=0.3.5; sys_platform == “win32” in c:\users\user_\appdata\roaming\python\python38\site-packages (from sphinx>=1.6->sphinx-rtd-theme->scholarly) (0.4.4)
Collecting sphinxcontrib-applehelp
Downloading sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl (121 kB)
|████████████████████████████████| 121 kB 3.3 MB/s
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from Jinja2>=2.3->sphinx>=1.6->sphinx-rtd-theme->scholarly) (2.0.1)
Requirement already satisfied: pytz>=2015.7 in c:\users\user_\appdata\roaming\python\python38\site-packages (from babel>=1.3->sphinx>=1.6->sphinx-rtd-theme->scholarly) (2021.1)
Building wheels for collected packages: stem, bibtexparser, fake-useragent, free-proxy
Building wheel for stem (setup.py) … done
Created wheel for stem: filename=stem-1.8.0-py3-none-any.whl size=436037 sha256=32fa89a2547cbb54f6a8b90326ca10070f983538b5879326d6806b7e036f4c8a
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\a3\1b\fa\3c533b58f796531853a1be08235439bc11594221011f472ebf
Building wheel for bibtexparser (setup.py) … done
Created wheel for bibtexparser: filename=bibtexparser-1.2.0-py3-none-any.whl size=36712 sha256=de0d96f4b88d9a7d12f6f601f8777c68f2175adcc74f1dee0e2b7948f04acf3b
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\9a\bf\37\abf100a7ad8c8bb49b300653a358ee67f195dfc471a1b56e4c
Building wheel for fake-useragent (setup.py) … done
Created wheel for fake-useragent: filename=fake_useragent-0.1.11-py3-none-any.whl size=13486 sha256=7310d32273ac9cbf5b11458c4814856bb3b1eec70907312c7a81b809bb922911
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\a0\b8\b7\8c942b2c5be5158b874a88195116b05ad124bac795f6665e65
Building wheel for free-proxy (setup.py) … done
Created wheel for free-proxy: filename=free_proxy-1.0.3-py3-none-any.whl size=4238 sha256=77214054bea7e60df9a952eaa2a897901fc1a6ff1e13f986e9d777ac9888aeff
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\e4\ea\63\e9370d81bf8f27a89fa04dd0c3424437809f4a9423f021eabd
Successfully built stem bibtexparser fake-useragent free-proxy
Installing collected packages: arrow, stem, bibtexparser, fake-useragent, free-proxy, snowballstemmer, sphinxcontrib-serializinghtml, sphinxcontrib-htmlhelp, babel, sphinxcontrib-devhelp, docutils, alabaster, sphinxcontrib-qthelp, imagesize, sphinxcontrib-jsmath, sphinxcontrib-applehelp, sphinx, sphinx-rtd-theme, scholarly
Successfully installed alabaster-0.7.12 arrow-1.2.0 babel-2.9.1 bibtexparser-1.2.0 docutils-0.17.1 fake-useragent-0.1.11 free-proxy-1.0.3 imagesize-1.2.0 scholarly-1.4.1 snowballstemmer-2.1.0 sphinx-4.2.0 sphinx-rtd-theme-1.0.0 sphinxcontrib-applehelp-1.0.2 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-htmlhelp-2.0.0 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3 sphinxcontrib-serializinghtml-1.1.5 stem-1.8.0

Enterキーを押すと、インストールが開始され、上記のように「Successfully installed」と表示されます。これが表示されれば、scholarlyが正常にインストールされたことになります。

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

コメント

タイトルとURLをコピーしました