bash
sudo service ssh start
ssh 127.0.0.1
#If that doesn't work, try the following:
sudo ssh-keygen -A
sudo service ssh restart
ssh 127.0.0.1
cmd@/Users/~/{project-dir}
bash
Like bash @ / mnt / c / Users / ~~ / {project-dir}
,
The current directory moves to the location where the directory that started bash is mounted.
bash@/mnt/c/Users/~~/{project-dir}
#If you are using pyenv"home/.pyenv/shims/python"Point to(global python)
python which
#Confirmation of global version
python --version
#If you want to use a different version, specify the local version here
pyenv local {version}
# bash(WSL)Create venv from(If there is an existing venv created from cmd or ps, create it with a name that will not be covered)
python -m venv {venv-name}
bash@/mnt/c/Users/~~/{project-dir}
#start venv
. {venv-name}/bin/activate
# "/mnt/c/Users/~~/{venv-name}/bin/python"Point to(Virtual environment python)
python which
pip install --upgrade pip
File> settings> Project: {project-name}> Python Interpreter> Gear button> Show All> + button> SSH Interpreter
C: / Users / ~~ / {project-dir}
* Remote Path/ mnt / c / Users / ~~ / {venv-name} / bin / python
bash@/mnt/c/Users/~~/{project-dir}
pip install -r requirements.txt
File> settings> Project: {project-name}> Make sure the package is loaded correctly from Python Interpreter
psycopg2
for handling PostgreSQL with Django needs to be installed by replacing it with psycopg2-binary
.Recommended Posts