LoginSignup
4
1

More than 5 years have passed since last update.

Virtualenvを使いたい!

Last updated at Posted at 2018-06-15

やりたいこと

プロジェクトごとにライブラリを分けたい!

環境

ubuntu

~/ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"

Pythonのバージョン

Python 3.5.2 (default, Nov 23 2017, 16:37:01) 

pipのバージョン

pip 10.0.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)

virtualenvをpipでインストール

pip install virtualenv

バージョンの確認

~/ virtualenv --version
16.0.0

virtualenvでプロジェクトフォルダを作成

virtualenv -p [Pythonの場所] [プロジェクト名]

virtualenvの環境に入る

. [プロジェクト名]/bin/active

virtualenvの環境から出る

deactivate
4
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
4
1