pythonの仮想環境でIDLEを実行する方法



Python
Pythonとは
基本的な使い方
・IDLE

・Jupyter Notebook

・Markdown

・コマンドプロンプトで実行

・仮想環境の構築

・仮想環境でIDLEを実行

ライブラリのインストール
・pipの使い方

・numpy , matplotlib等

・graphviz

・pytorch

・Mecab

Pythonの関数:一覧
共通関数
・append , extend

・class

・copy

・csv.reader

・csv.writer

・def , return

・dict , defaultdict

・enumerate

・exit

・for

・if

・import

・in

・input

・lambda

・len

・list

・min/max

・OrderedDict

・open/close

・os

・pickle

・print

・range

・re.split

・read/readline

・round/floor/ceil

・split

・sys.argv

・time

・while

・write

・zip

・特殊メソッド
 ・__name__

 ・__iter__ , __next__

・正規表現、メタ文字

・データの型の種類

・四則演算 (+ , - , * , /)

・コメントアウト (# , ''')

numpy
・append

・arange

・argmax/argmin

・array

・asfarray

・astype , dtype

・digitize

・dot

・hstack/vstack

・linalg.solve

・linspace

・max,min

・mean

・meshgrid

・mgrid

・ndim

・ndmin

・pad

・poly1d

・polyfit

・prod

・random

・reshape

・savetxt/loadtxt

・shape

・std

・transpose

・where

・zeros/zeros_like

scipy
・expit

・imread

・interpolate

・signal.square, sawtooth

matplotlib
・contour

・imshow

・figure

・pcolormesh

・plot

・quiver

・scatter

scikit-learn
・GaussianNB

・KMeans

・KNeighborsClassifier

・SVC

・tree

chaospy

keras

chainer

chainerrl

pandas
・データ抽出

・concat

・DataFrame

・read_excel

pytorch
・BCELoss , MSELoss

・Embedding

・device

・Sequential

・Dataset, Dataloader

・RNN, LSTM

OpenAI gym
・Blackjack-v0

・CartPole-v0

seaborn
・pairplot

tkinter
・frame, grid

・画像表示

・画像を切り取り表示

・画像を保存

目的別
・ステップ関数

・矩形波, 三角波

・1 of K 符号化法

・線形補間

・配列に番号をつける

・ベクトル場を描く

・線形回帰, 多項式回帰

・Bluetooth接続


公開日:2022/10/9          

前提知識
・IDLEの使用方法 ・仮想環境の構築方法


■pythonの仮想環境でIDLEを実行する方法

pythonの仮想環境でIDLEを実行する方法を説明します。IDLEとはpythonに標準でついているテキストエディタです。 ここでは仮想環境が既に構築されている前提で説明します。仮想環境の構築方法はこちら。

① 仮想環境フォルダの「.venv」 - 「Scripts」フォルダ内のpythonw.exeファイルがある階層に、拡張子が「pyw」のテキストファイルを作ります。 ここではsample.pywとします。



ファイルの中身は以下とします。

from idlelib.pyshell import main
main()


② 仮想環境ではない、もともとあったIDLEのショートカットカットを複製します。ファイル名は適当につけます。



③ ショートカットカットを右クリックしてプロパティを選択し、リンク先を以下のように変更します。



③ これで仮想環境でIDLEが使える状態になりました。本当に仮想フォルダ内でIDLEが起動されているか確かめるために、ショートカットをクリックしてIDLEを起動し、以下コマンドを入力します。出力結果のpathが仮想フォルダ内であれば成功です。

import sys
sys.path









サブチャンネルあります。⇒ 何かのお役に立てればと

関連記事一覧



Python
Pythonとは
基本的な使い方
・IDLE

・Jupyter Notebook

・Markdown

・コマンドプロンプトで実行

・仮想環境の構築

・仮想環境でIDLEを実行

ライブラリのインストール
・pipの使い方

・numpy , matplotlib等

・graphviz

・pytorch

・Mecab

Pythonの関数:一覧
共通関数
・append , extend

・class

・copy

・csv.reader

・csv.writer

・def , return

・dict , defaultdict

・enumerate

・exit

・for

・if

・import

・in

・input

・lambda

・len

・list

・min/max

・OrderedDict

・open/close

・os

・pickle

・print

・range

・re.split

・read/readline

・round/floor/ceil

・split

・sys.argv

・time

・while

・write

・zip

・特殊メソッド
 ・__name__

 ・__iter__ , __next__

・正規表現、メタ文字

・データの型の種類

・四則演算 (+ , - , * , /)

・コメントアウト (# , ''')

numpy
・append

・arange

・argmax/argmin

・array

・asfarray

・astype , dtype

・digitize

・dot

・hstack/vstack

・linalg.solve

・linspace

・max,min

・mean

・meshgrid

・mgrid

・ndim

・ndmin

・pad

・poly1d

・polyfit

・prod

・random

・reshape

・savetxt/loadtxt

・shape

・std

・transpose

・where

・zeros/zeros_like

scipy
・expit

・imread

・interpolate

・signal.square, sawtooth

matplotlib
・contour

・imshow

・figure

・pcolormesh

・plot

・quiver

・scatter

scikit-learn
・GaussianNB

・KMeans

・KNeighborsClassifier

・SVC

・tree

chaospy

keras

chainer

chainerrl

pandas
・データ抽出

・concat

・DataFrame

・read_excel

pytorch
・BCELoss , MSELoss

・Embedding

・device

・Sequential

・Dataset, Dataloader

・RNN, LSTM

OpenAI gym
・Blackjack-v0

・CartPole-v0

seaborn
・pairplot

tkinter
・frame, grid

・画像表示

・画像を切り取り表示

・画像を保存

目的別
・ステップ関数

・矩形波, 三角波

・1 of K 符号化法

・線形補間

・配列に番号をつける

・ベクトル場を描く

・線形回帰, 多項式回帰

・Bluetooth接続