LoginSignup
3
0

More than 1 year has passed since last update.

M1 Mac Django環境構築

Last updated at Posted at 2021-08-02

Homebrewはインストールしてある。

brew install pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
source ~/.bash_profile

arch -arch x86_64 env PATH=${PATH/\/opt\/homebrew\/bin:/} pyenv install 3.8.7
brew install bzip2 libffi libxml2 libxmlsec1 openssl readline sqlite xz zlib
pyenv install 3.8.7
pyenv local 3.8.7
pyenv rehash

pip3 install virtualenv
virtualenv 仮想環境名
source 仮想環境名/bin/activate
pip install django==3.0.1 #バージョンはお好きなもので

これでDjangoがインストールでいました。

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0