会社でよく依頼されることがあります。
![](https://himasugi.com/wp-content/uploads/2021/11/man-icon-150x150.png)
正直めんどくさいですよね。
![](https://himasugi.com/wp-content/uploads/2020/06/kappa-ningyou-jyouhanshin-150x150.jpg)
![](https://himasugi.com/wp-content/uploads/2020/06/kappa-ningyou-jyouhanshin-150x150.jpg)
![](https://himasugi.com/wp-content/uploads/2020/06/kappa-ningyou-jyouhanshin-150x150.jpg)
めんどくさいことはパソコンにやらせよう。
ということで、何やらPythonは色々自動化するのに向いてるようなので、独学で使えるレベルまで勉強してみようと思います。
今回はPythonの初期設定までを行っていきます!
Pythonを使うのに必要なもの
Pythonを使うには2つ必要なものがあります。
- Python
- エディタ
正直よくわかっていないんですが、Pythonを使うにはPythonをインストールしないといけないようです。
PythonやJavaなどのプログラミング言語を編集するソフト
Pythonのインストール方法
Pythonの公式HPでダウンロードします。
こういった注意書きが出るかもしれませんが、無視して保存。
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-2.jpg)
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-2.jpg)
問題は起こりません、多分
デスクトップに保存するとこんなアイコンが表示されます。
ちなみにこれはインストーラーなので、まだPython本体ではありません。
このアイコンをダブルクリックしてインストーラーを起動します。
保存されるフォルダは忘れてもいいけど、このあたりにあったなくらいは覚えておくようにしましょう。
Pythonを使うには「インタープリタ」へパスを通す必要があります。
「○○をしろ!」と人間語で書かれた言語(Pythonなど)を
機械語(010000101001)に変換するソフト
「Add Python ….PATH」にチェックを入れておけば自動でパスを通してくれます。
チェックを入れたら「Instal Now」をクリック!
プログラミングをするうえで、パスについてはある程度理解しておく必要があります。
この記事を参考にしてみてください。
![](https://himasugi.com/wp-content/uploads/2023/03/beginner-explained-a-directory-that-python-beginners-cant-understand_ic-300x200.png)
![](https://himasugi.com/wp-content/uploads/2023/03/beginner-explained-a-directory-that-python-beginners-cant-understand_ic-300x200.png)
こんな感じの注意書きが出るけど、気にせず「はい」でOK。
ちょっと待つと・・・
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-5.jpg)
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-5.jpg)
20秒くらい待つと…
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-6.jpg)
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-6.jpg)
「Close」をクリックして終了。
これでPythonのインストールは完了です。
次に、Pythonを編集するソフト=エディタをインストールします。
エディタのインストール
![](https://himasugi.com/wp-content/uploads/2021/11/man-icon-150x150.png)
![](https://himasugi.com/wp-content/uploads/2021/11/man-icon-150x150.png)
![](https://himasugi.com/wp-content/uploads/2021/11/man-icon-150x150.png)
何度も聞いたことがある言葉ですが、この言葉に騙されてはいけません。
プロのプログラマーはみんな専用のエディタを使ってます。
ということはそういうことです。
専用のエディタをインストールしましょう。
特におすすめなのが「Visual Studio Code」です。
![](https://himasugi.com/wp-content/uploads/2023/03/how-super-beginners-get-started-with-python-24.jpg)
![](https://himasugi.com/wp-content/uploads/2023/03/how-super-beginners-get-started-with-python-24.jpg)
こんな感じの見た目
かの有名なMicrosoftが作っているテキストエディタです。
Visual Studio CodeはMicroSoft公式ホームページからできます。
![](https://code.visualstudio.com/opengraphimg/opengraph-home.png)
![](https://code.visualstudio.com/opengraphimg/opengraph-home.png)
自分が使っているOSを選んでダウンロードしましょう。
僕はWindows10なので、矢印の部分をクリック。
もしダウンロードができなかったら・・・
「direct download link」をクリック。ちなみに僕はダウンロードが始まらずにこれをクリックしました。
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-12.jpg)
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-12.jpg)
警告は無視
これでVSCodeのインストーラーがダウンロードできました。
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-13.jpg)
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-13.jpg)
これがインストーラ
早速インストールしていきましょう。
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-14.jpg)
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-14.jpg)
同意するにチェックして「次へ」
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-16.jpg)
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-16.jpg)
スタートメニューに追加したい人は作成
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-17.jpg)
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-17.jpg)
デスクトップにアイコンは必須なのでチェックして「次へ」
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-19.jpg)
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-19.jpg)
インストールが開始されます
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-20.jpg)
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-20.jpg)
実行するにチェックを入れて「完了」
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-21.jpg)
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-21.jpg)
右下に日本語のパックをインストールが出るのでクリック
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-22.jpg)
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-22.jpg)
これで表示が日本語になりました!
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-23.jpg)
![](https://himasugi.com/wp-content/uploads/2022/07/python-install-23.jpg)
これがVSC
この記事を参考にしてね!
![](https://himasugi.com/wp-content/uploads/2023/04/vscode-icon-300x200.jpg)
![](https://himasugi.com/wp-content/uploads/2023/04/vscode-icon-300x200.jpg)
まとめ
これでPythonとエディタ(VSCode)のインストールが完了しました。
もう好きな時にPythonでプログラミングをすることができますよ!
ただ、まだ何をどうしたらいいか分からないと思うので、こちらの記事で初心者がやるべきことを書いています。
参考にしてください。
![](https://himasugi.com/wp-content/uploads/2022/08/study-child-pakutaso-300x200.jpg)
![](https://himasugi.com/wp-content/uploads/2022/08/study-child-pakutaso-300x200.jpg)
こんな感じ!
カッパ