我有python 3.5和2.7。当我在pycharm中使用代码import pymongo
时,它返回:
Traceback (most recent call last):
File "/home/tian/PycharmProjects/untitled/ing.py", line 1, in
<module>
import pymongo
ImportError: No module named 'pymongo'
现在我已经在python2.7和python 3.5中安装了pymongo但是它仍然无效。
$ python -c "import sys; print(sys.version)"
3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609]
$ python -c "import pymongo; print(pymongo.version);
print(pymongo.has_c())"
3.6.0
True