Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows10環境でvenvを利用して実行可能 #5

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions chapter5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,34 @@ dockerのプロセスは次のコマンドで停止できます。
```
$ docker-compose stop
```

### vnevを利用した環境構築とjupyter notebook起動の手順

#### venvによるライブラリのインストール

poetryを使わずpythonのvenvを利用し、実行に必要なライブラリをインストールします。
なお、下記についてはWindows環境上のPython3.7.8で動作を確認しています。Windows環境でも[pyenv-win https://github.com/pyenv-win/pyenv-win](https://github.com/pyenv-win/pyenv-win)をインストールすることでpyenvが利用できます。

1. pythonの仮想環境を作成します。
```
$ python -m venv venv37
```
1. 仮想環境venv37を有効化します。
```
$ venv37\Script\activate
```
1. ライブラリをインストールします。
```
(venv37) $ pip install -r requirements.txt
```

#### jupyter notebookの起動
先に作成した仮想環境venv37上でjupyter notebookを起動します。
```
(venv37) $ jupyter notebook
```

jupyter labも利用可能です。
```
(venv37) $ jupyter lab
```
14 changes: 14 additions & 0 deletions chapter5/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
numpy ~= 1.19.5
pandas ~= 1.2.0
sklearn ~= 0.0
tqdm ~= 4.55.2
jupyterlab ~= 3.0.3
jedi == 0.17.2
matplotlib ~= 3.4.1
scikit-surprise ~= 1.1.1
gensim ~= 4.0.1
implicit ~= 0.4.4
wheel ~= 0.36.2
ipywidgets ~= 7.6.3
mlxtend ~= 0.18.0
xlearn ~= 0.40a1