简体   繁体   English

如何将库GMP导入Sage / Python项目

[英]How to import a library GMP into Sage/Python project

I have already installed the GMP library, Now i want to import this library to sage project i tried to put : 我已经安装了GMP库,现在我想将这个库导入我试图放入的sage项目:

      import libgmpxx.so.4

      libgmpxx.so.4.path.append('usr/local/lib/')

but it does'nt work unfortunately, how can i do that. 但不幸的是,它无法工作,我怎么能这样做。 regards 问候

Sage's Integer class uses GMP (or MPIR) automatically. Sage的Integer类自动使用GMP(或MPIR)。 If you are trying to use GMP independently of Sage, look at gmpy . 如果您尝试独立于Sage使用GMP,请查看gmpy

Disclaimer: I'm the maintainer of gmpy. 免责声明:我是gmpy的维护者。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM