i want install 3rd library -> bson. but error with next, who knows why?
# pip install bson
Collecting bson
Using cached bson-0.5.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-cP7YdW/bson/setup.py", line 8, in <module>
from pip import get_installed_distributions
ImportError: cannot import name get_installed_distributions
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-cP7YdW/bson/
system info:
# uname -a
Linux instance-says 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux
python and pip version info:
# python -V
Python 2.7.13
# pip --version
pip 10.0.0 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)
pip authors were warning for many years to not import pip. Finally at version 10 they restructured their code.
To continue using pip with packages that import pip you need pip version 9:
python -m pip install -U 'pip>=9,<10'
PS. There is already a bug report.
easy fix:
pip uninstall bson
pip uninstall pymongo
pip install pymongo
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