venv環境に入ってpythonファイルを実行するシェルスクリプトを作成する 2019年9月6日 / 1 min read View more blogs with the tag python , View more blogs with the tag ubuntu Table of Contents #はじめに #方法 はじめに venv環境でpythonファイルを実行するシェルスクリプトを作成する方法です。 方法 #! /bin/bash # 仮想環境フォルダまで移動cd /hoge/fuga # venv環境のactivate. 仮想環境名/bin/activate # 実行ファイルまでのパスcd /hoge/fuga # pythonの実行python hoge.py # 仮想環境から抜けるdeactivate