Hello it is what you are trying to produce the app in django in python beginner. (Development with python3 system) It seems that you can do it with anaconda + django, but since there is little information, I will challenge it later. First, check the difference between pyenv, virtualenv, pip, and anaconda. https://mycodingjp.blogspot.com/2018/12/python-venv-virtualenv.html https://oversleptabit.com/archives/2195 https://qiita.com/caad1229/items/325ca5c8ad198b0ebce7 I decided to go with virtualenv + pip. On the official website, I created a virtual environment with the venv command. I was able to do that, but I'll leave it for now. https://www.python.jp/install/macos/virtualenv.html
% python -V
Check the version of your own pc. I already had the 2nd system. Since the 2nd system is no longer supported, install the 3rd system. As a flow It should go to xcode → homebrew → python3. By the way, it seems that you need to install xcode to use homebrew. (Homebrew manages packages.)
% xcode-select --install
If you search the net for homebrew installation, the command will come out immediately
% /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
% brew install python3
Now we will finally create a virtual environment. First, install virtualenv
% sudo pip install virtualenv
Then
sudo: pip: command not found
When. No command? According to the net, there is a note that comes with installing python. .. Is there no pip?
% where pip
/usr/local/bin/pip
In my case, I thought it was a version issue, so I will update the version. To pip3. ..
% pip3 install --user --upgrade pip
If you can't use the pip command, you can get a hint by looking at this as well. https://www.python.jp/install/ubuntu/pip.html https://qiita.com/sf213471118/items/3ee4ebd5d39856345682 https://qiita.com/tom-u/items/134e2b8d4e11feea8e12
Try again
% sudo pip install virtualenv
I was able to go! !! !! !!
Looking at the official website, I wondered if there was a different method, but I will consider it again.
I'm glad I was able to go crispy after that.
% virtualenv -p python3 favorite name
Create a virtual environment by specifying python3. I will go inside the one I made
% . .Favorite name/bin/activate
Or
%source Favorite name/bin/activate
When exiting
% deactivate
It took a long time, but I was relieved. After making one app, I will try the official method. Please feel free to correct any mistakes.
Recommended Posts