Subject: [mongodb-user] Difficulties with installation of
python3 packages pymongo



Hello,
I have difficulties with installation of python3 version of pymongo package in version 2.9.5 (available here: https://pypi.python.org/pypi/pymongo/2.9.5). I cannot use last pymongo package version because my project use Ming (https://pypi.python.org/pypi/Ming) who only support pymongo<3.0.
When pymongo is installed on debian stretch or jessie, no problem. Installed files are python3 files. Example with docker:
1. Start a container with: docker run -it debian:stretch /bin/bash2. Install pymongo for python 3 with: apt-get update && apt-get install -y python3-pip && pip3 install pymongo==2.9.53. Check file a pymongo file: cat /usr/local/lib/python3.5/dist-packages/pymongo/__init__.py | grep basestring        --> output is empty
But in "hand make" docker image:
1. Start teh container (i will detail how container is built)2. Install pymongo for python 3 with: apt-get update && apt-get install -y python3-pip && pip3 install pymongo==2.9.53. Check file a pymongo file (this test is positive in second case): cat /usr/lib/python3.5/site-packages/pymongo/__init__.py | grep basestring
---> output is: "if isinstance(version_tuple[-1], basestring):"
Code in /usr/lib/python3.5/site-packages/pymongo/ is python2 code. So it fail when executed with python3. The docker image is an image build with Yocto and https://layers.openembedded.org/layerindex/recipe/61661/ recipe. For example, some packages versions:
- python3 == 3.5.2 - python3-pip == 9.0.1 - git == 2.11.1- gcc ==  6.3.0- binutils == 2.28
Do you have an idea why pymongo package is installed with python2 files in second case ? Thank you,
Bastien.
Note: i don't know with but in debian stretch example, pymongo files are in /usr/local/lib/python3.5/dist-packages dir and in my "hand make" docker image pymongo files are in /usr/lib/python3.5/site-packages.

--
You r...

eceived this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/b4fe99cb-e5e1-40a8-969b-e0035952e894%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



Programming list archiving by: Enterprise Git Hosting