简体   繁体   中英

Linking library in python

I want to use the Cantera library in python. I have been using it for C++ and I am linking my adding these couple lines to my makefile:

CANT_LIB = $HOME/usr/local/Cantera201/lib/
CANT_INC = $HOME/usr/local/Cantera201/include/ -I $HOME/usr/local/Cantera201/include/cantera \

with CANT_LIB and CANT_INC being called when compiling.

I have very limited experience with python. Is there an equivalent to linking libraries in python? I have tried adding the cantera path to PYTHONPATH but it did not work. I am working on a Linux server on which I do not have access to super user and python 2.6.6 .

You need to install Cantera's Python module to use it, the raw C/C++ libraries aren't enough. If you install using the directions on their website it should be installed to the appropriate Python site-packages directory automatically, and available for use with just import cantera .

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.

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