whenever I try to get a module in python, it only works in terminal and I asked someone and they said I had multiple python paths and that terminal was using the correct one.(something like that). I go into my terminal and find python directory but there are multiple things there and I don't know what to do delete. this is what is shown:
astroid pylint
astroid-2.3.3.dist-info pylint-2.4.4.dist-info
isort six-1.14.0.dist-info
isort-4.3.21.dist-info six.py
lazy_object_proxy wrapt
lazy_object_proxy-1.4.3.dist-info wrapt-1.11.2-py3.8.egg-info
mccabe-0.6.1.dist-info
I have no idea what to uninstall
MacOS is based on a BSD code base, while Linux is an independent development of a unix-like system. Most of the times, MacOS and Linux has 2 different versions of python(By default MacOS ships with Python-2.7). if you want to use python-3 and its modules, you should change somtehing on MacOS.
if you don't have version 3.x of python, install it with this command:
brew install python
and then change the alias of python, in the terminal. run:
sudo nano ~/.bashrc
then you can pass in the last line:
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
alias python='python3.8'
alias pip= 'pip3'
after all, run:
source .bash_profile
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.