I want to use a python script which imports gmpy. However, python always tells me:
ImportError: No module named 'gmpy'
I am on Ubuntu 14.04 i686 and I tried to install gmpy over various ways:
Obviously I am using python 3.4.0:
$ python
$ Python 3.4.0 (default, Apr 11 2014, 13:05:18)
[GCC 4.8.2] on linux
What am I missing such that python is not able to find the gmpy libs?
Any of the following solutions solved the problem:
sudo pip3 install gmpy
(I executed the wrong pip as I am using python3)
or
$ python2.7 script.py
(Or simply use python2 interpreter)
Done.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.