开发者

how to include python modules in linux?

开发者 https://www.devze.com 2023-01-18 21:01 出处:网络
I found this xgoogle python modules http://github.com/pkrumins/xgoogle, very interesting. How开发者_运维问答 exactly should i include or install these files in linux??

I found this xgoogle python modules http://github.com/pkrumins/xgoogle, very interesting. How开发者_运维问答 exactly should i include or install these files in linux??

if i want to do something like this using xgoogle python module?

>>from xgoogle.search import GoogleSearch 

I know that we can use from, import to use modules, but to include an external module, what should i do? Should i need to install module or what?


You could either do the usual install dance:

python setup.py install

or simply include the files in a known directory and include that directory in the PYTHONPATH:

$ export PYTHONPATH=/contains/modules:$PYTHONPATH

Here's a detailed documentation on Installing Python Modules: http://docs.python.org/install/


You can install it with other python libraries / modules, or just put it in the same repository than your project.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号