-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
# Feel free to add content and custom Front Matter to this file. | ||
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults | ||
title: ジョブ管理システムでconda/pyenvなどのpython仮想環境を利用する方法 | ||
layout: single | ||
date: 2023-11-14 21:00:00 +0900 | ||
categories: | ||
- code | ||
tags: | ||
- bash | ||
- emacs | ||
description: ジョブ管理システムでconda/pyenvなどのpython仮想環境を利用する方法 | ||
--- | ||
|
||
|
||
## condaの場合 | ||
|
||
condaを利用するには,もしanacondaを利用しているなら`.bash_profile`に記載するように`conda.sh`を読み込む必要がある.通常のshell利用時にはあまり意識しないので注意が必要. | ||
|
||
```bash | ||
. ${HOME}/anaconda3/etc/profile.d/conda.sh | ||
conda activate your_env | ||
# テスト | ||
# conda env list | ||
``` | ||
|
||
## venvの場合 | ||
|
||
venvの場合は通常のshellと同様の操作で大丈夫. | ||
|
||
```bash | ||
VENV_DIR="/path/to/env/" | ||
python -m venv ${VENV_DIR} | ||
source ${VENV_DIR}/bin/activate | ||
``` | ||
|