When you start python or ipython in an interactive shell, the version should first be written as below
If the version is different between ipython and pyhton, the installed package will be different and it will be troublesome ... so the story when I fixed it
$ which python
$ which ipython
Check each location with
which ipython
The place that came out in (/usr/local/bin/About ipython etc.)
$ vi /usr/local/bin/ipython
Edit with etc.
Then
#!/Users/user_name/.pyenv/shims/python
set -e
[ -n "$PYENV_DEBUG" ] && set -x
program="${0##*/}"
if [[ "$program" = "python"* ]]; then
for arg; do
case "$arg" in
-c* | -- ) break ;;
*/* )
if [ -f "$arg" ]; then
export PYENV_FILE_ARG="$arg"
break
fi
;;
esac
done
fi
It should look like this, so let's change the top line to the location where it came out with `` `which python```
Now when I restart the terminal, ipython starts with the same version as python!
Reference: http://stackoverflow.com/questions/9386048/ipython-reads-wrong-python-version
Recommended Posts