问题
Terminal command :
python -V output: Python 3.5.2
I'm trying pip
and setuptools
update on pycharm
but this error occurred :
Error :python packaging tool 'pip' not found.
Proposed solution:
Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at '/usr/bin/python3.5'.
Terminal command :
which pip output: usr/bin/pip
And I'm trying on terminal command :
pacman -S(or -Syu,-Syy) python-pip or pacman -S(-Syu,-Syy) python-setuptools
resolving dependencies...
looking for conflicting packages...
Packages (5) python-packaging-16.7-1 python-pyparsing-2.1.5-1
python-setuptools-1:24.0.2-1 python-six-1.10.0-2
python-pip-8.1.2-1
Total Installed Size: 8.03 MiB
:: Proceed with installation? [Y/n] y
(5/5) checking keys in keyring [######################] 100%
(5/5) checking package integrity [######################] 100%
(5/5) loading package files [######################] 100%
(5/5) checking for file conflicts [######################] 100%
error:failed to commit transaction (conflicting files)
python-setuptools: /usr/bin/easy_install exists in filesystem
python-setuptools: /usr/bin/easy_install-3.5 exists in filesystem
python-pip: /usr/bin/pip exists in filesystem
python-pip: /usr/bin/pip3 exists in filesystem
python-pip: /usr/bin/pip3.5 exists in filesystem
Errors occured, no packages were upgraded.
So I'm trying :
python -m pip install -U pip
Output :
/usr/bin/python: No module named pip
How to update pip ?
回答1:
This should work:
pacman -S --force python-pip and pacman -S --force python-setuptools
回答2:
It's not recommended to install python packages along with pacman. because pacman doesn't recognize any package installed by pip. I think you should remove all pip packages instelled using pip and reinstall all python packages using pacman or virtualenv. if you need python packages for arch you can search through AUR or you can install any python packages in a virtual environment.
回答3:
If you want the most up-to-date version from pypi
and not from repository, then do something like
pip install -U pip
来源:https://stackoverflow.com/questions/38286602/archlinux-pip-and-setuptools-not-upgraded