Building a Python 3.6 environment with Windows + PowerShell

There are many other articles about building a Python environment ...

Yes, I'm a little bit sick. I couldn't find an installation method that meets the following conditions, so I'll keep it as a memorandum.

Why not use Anaconda?

Please guess

Why PowerShell?

Since Python 3.6, the console encoding has changed to UTF-8, and it seems that it also supports long paths, so this is an attempt to escape from the Paleolithic command prompt.

Venv for virtual environment

Since virtualenvwrapper-powershell only supports Python 2.7 and virtualenvwrapper-win does not support PowerShell, I will take this opportunity to try using venv.

Install

Download and install from Official Site.

The default installation path is too long, so I changed it to C: \ Python36.

Change execution policy

Start PowerShell and do the following: This work only needs to be done once.

Set-ExecutionPolicy Unrestricted -Force -Scope CurrentUser

Virtual environment (venv)

Creating a virtual environment

python3 -m venv <Virtual environment name>

Switching virtual environment

~\<Virtual environment name>\Scripts\Activate.ps1
deactivate

Speaking of virtual environment in Python, virtualenv was the standard, but venv seems to be enough.

reference

Python.jp > Environment Construction Guide > Python in Windows environment http://www.python.jp/install/windows/index.html

Python.jp > Environment Construction Guide > Python in Windows environment http://www.python.jp/install/windows/virtualenv.html#h_install_windows_virtualenv_2erst_5

Recommended Posts

Building a Python 3.6 environment with Windows + PowerShell
Building a virtual environment with Python 3
[Pyenv] Building a python environment with ubuntu 16.04
Building a Python3 environment with Amazon Linux2
Building a python environment with virtualenv and direnv
Building a Windows 7 environment for getting started with machine learning with Python
Building a Python environment with WLS2 + Anaconda + PyCharm
venv environment with windows powershell
Building a Python virtual environment
Building a Python virtual environment
Recommendation of building a portable Python environment with conda
Procedure for building a CDK environment on Windows (Python)
conda memorandum: Building a Python environment with supercomputer ITO
Building a kubernetes environment with ansible 2
Building a Python environment on Mac
Create a virtual environment with Python!
Building a kubernetes environment with ansible 1
python windows environment
I replaced the Windows PowerShell cookbook with a python script.
Let's get started with Python ~ Building an environment on Windows 10 ~
[Python] Building an environment with Anaconda [Mac]
[Python] Create a virtual environment with Anaconda
[Mac] Building a virtual environment for Python
Creating a python virtual environment on Windows
Build a python virtual environment with pyenv
Build a modern Python environment with Neovim
Building a Python development environment for AI development
Create a Python execution environment for Windows with VScode + Remote WSL
Everything from building a Python environment to running it on Windows
LaTeX and R (a little Python) environment construction with SublimeText3 (Windows)
python windows environment construction
Python starting with Windows 7
Python environment with docker-compose
Create a Python environment
Virtual environment with Python 3.6
Simply build a Python 3 execution environment on Windows
Build a python environment with ansible on centos6
Building an Anaconda environment for Python with pyenv
Create a virtual environment with conda in Python
[Python] Build a Django development environment with Docker
Create a python3 build environment with Sublime Text3
Image Processing with Python Environment Setup for Windows
[Python] Web development preparation (building a virtual environment)
A memo when creating a python environment with miniconda
Think about building a Python 3 environment in a Mac environment
Commands for creating a python3 environment with virtualenv
Work in a virtual environment with Python virtualenv.
Build a Python environment with OSX El capitan
Quickly build a Python Django environment with IntelliJ
Building a Python environment on a Sakura VPS server
Create a Python virtual development environment on Windows
Build a Python machine learning environment with a container
Build a python execution environment with VS Code
Get a quick Python development environment with Poetry
Steps to create a Python virtual environment with VS Code on Windows
Python with VS Code (Windows 10)
Build a GVim-based Python development environment on Windows 10 (3) GVim8.0 & Python3.6
Building a Python environment for pyenv, pyenv-virtualenv, Anaconda (Miniconda)
Write about building a Python environment for writing Qiita Qiita
Run python with PyCharm (Windows)
Install Python environment with Anaconda