Python environment preparation (venv first time use)

** Personal memo 2 **

Creating a Python environment The PC I'm using at work is Anaconda, which was working well When I tried to create an environment for my home PC, it didn't work, so I tried another method.

Windows10 home


python install

https://www.python.org/downloads/windows/

~Windows x86-64 executable installer Drop and install

I made it Ver.3.7.7 today

I forgot to pass PATH, so I put it in the system environment variable PATH C:~\Python\Python37 C:~\Python\Python37\Scripts Added two


Use virtual environment venv

Worked with PowerShell

Reference URL

https://qiita.com/fiftystorm36/items/b2fd47cf32c7694adc2e https://docs.python.org/ja/3/library/venv.html

Move to the destination you want to save

Folder to create cd environment

Decide a name and create an environment → You can create a folder with the environment name without permission

python -m venv environment name

Activate → get stuck here

.\Environment name\Scripts\activate

"Because script execution is disabled on this system" I can't activate it somehow

Reference URL

https://toypool.hatenablog.com/entry/2019/02/08/142824 https://qiita.com/ryu22e/items/520b35db6a444d8289da

Follow the above and restart Powershell with administrator privileges

Set-ExecutionPolicy RemoteSigned

Proceed with Yes

Activate again to complete

.\Environment name\Scripts\activate

Powershell display (Environment name) ~ Maybe OK because it changed to

After that, should I prepare various things with pip install ***? In Visual studio code, it worked fine when I reselected to Python in the environment I created


Things I put in today

numpy opencv-python pyrealsense2 open3d-python pandas matplotlib seaborn bokeh

Recommended Posts

Python environment preparation (venv first time use)
First time python
First time python
Use jupyter-lab installed in python virtual environment (venv)
venv: Python virtual environment management
python standard virtual environment venv
python3.8 venv environment jupyter notebook
Prepare your first Python development environment
Python (from first time to execution)
See python for the first time
venv (Python)
Python & Machine Learning Study Memo: Environment Preparation
Python development environment for macOS using venv 2016
Use smbus with python3 under pyenv environment
Using venv in Windows + Docker environment [Python]
Python3 + venv + VSCode + macOS development environment construction
MongoDB for the first time in Python
How to use MkDocs for the first time
First Python 3 ~ First comparison ~
Python environment construction
python environment settings
python windows environment
Environment construction (python)
Use logger with Python for the time being
Use multiple versions of python environment with pyenv
python time measurement
Use Python in your environment from Win Automation
[Python] Web development preparation (building a virtual environment)
python environment construction
[Venv] Create a python virtual environment on Ubuntu
Python --Environment construction
First Python ~ Coding 2 ~
Procedure for creating a Python quarantine environment (venv environment)
Python environment construction
Use Python in Anaconda environment with VS Code
First python ① Environment construction with pythonbrew & Hello World !!
python environment construction
Use pydantic when reading environment variables in Python
Python virtual environment in 2021 ~ There is no reason not to use venv now ~
Use os.getenv to get environment variables in Python
Periodically execute python script with cron in venv environment
I tried Python on Mac for the first time.
Install Python venv --VSCode --GitHub integration environment on Mac
Use Python installed with pyenv for PL / Python execution environment
I tried python on heroku for the first time
Use the CASA Toolkit in your own Python environment
Build a Python virtual environment using venv (Django + MySQL ①)
Building and enabling a python virtual environment, etc. (venv)
Install Python environment on local PC (pyenv, venv on Mac)
Setting up Jupyter Lab in a Python 3.9 venv environment
Python: Time Series Analysis
Scraping with Python (preparation)
[Python] Get environment variables
My python environment memo
Use config.ini in Python
First Python 3rd Edition
[Python] Use JSON with Python
Function execution time (Python)
Use dates in Python
PyQ ~ Python First Steps ~
Unification of Python environment