LoginSignup
2
1

More than 3 years have passed since last update.

windowsにpipenvを導入手順

Last updated at Posted at 2019-07-25

pipenv公式: https://pipenv-ja.readthedocs.io/ja/translate-ja/index.html

windowsにpipenvを導入する。

OS: Windows 10 Home(version 1709)
Python: 3.7

pipenvをインストールする

$ pip install --user pipenv 

python -m pipenvでpipenvが動作します。

環境変数を設定する

pipenvの環境変数のパスを設定します。
僕の場合はc:\users\ksait\appdata\roaming\python\python37\scriptsでした。

設定しないと以下のようにpython -mを毎回入力しないといけません。

$ python -m pipenv run python main.py

pipenvを初期化する

$ cd myproject
$ pipenv install

モジュールをインストールする

$ pipenv install numpy

シェルに入る

$ pipenv shell

スクリプトの登録

pipfileにスクリプトの登録を行う。

[scripts]
start = "python main.py"

スクリプトの実行

$ pipenv run start

リンク

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1