i've installed both python3 and python it used to work everything perfect but today i encountered several issues with pip
then i tried to uninstall it and install it again i've made
sudo apt-get remove pip
sudo apt-get remove pip3
sudo apt-get purge pip
sudo apt-get purge pip3
sudo apt-get remove python-setuptools
sudo apt-get remove python3-setuptools
and when i write down "pip" at the prompt i still have this error:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==9.0.1', 'console_scripts', 'pip')()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 356, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2476, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2190, in load
['__name__'])
File "/usr/local/lib/python3.4/dist-packages/pip-9.0.1-py3.4.egg/pip/__init__.py", line 21, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
File "/usr/local/lib/python3.4/dist-packages/pip-9.0.1-py3.4.egg/pip/_vendor/requests/__init__.py", line 65, in <module>
from . import utils
File "/usr/local/lib/python3.4/dist-packages/pip-9.0.1-py3.4.egg/pip/_vendor/requests/utils.py", line 22, in <module>
from . import certs
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1129, in _exec
File "<frozen importlib._bootstrap>", line 1467, in exec_module
File "<frozen importlib._bootstrap>", line 1570, in get_code
File "<frozen importlib._bootstrap>", line 656, in _compile_bytecode
ValueError: bad marshal data (unknown type code)
what do you suggest? thanks
If you want to force pip to clear out its download cache and use the specific version you can do by using --no-cache-dir command. If you are using an older version of pip than upgrade it with pip install -U pip. This will help you clear pip cache.
What you need to do to solve this issue is navigate to the Pip from the version that you have installed the package, in this case, 3.7, uninstall or update the package using this pip. Save this answer.
you need to execute the following command to install pip
sudo apt-get install python3-pip
and to remove you need to use
sudo apt-get --purge autoremove python3-pip
I had the same problem, but I solved using the command below:
sudo python -m pip uninstall pip
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With