在virtualenv中使用c ++编译库 [英] Use c++ compiled library in virtualenv

查看:153
本文介绍了在virtualenv中使用c ++编译库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

注意
这是一个python-2.7 / django-1.6项目

Notes This is a python-2.7/django-1.6 project

我有一个项目需要使用 libRETS C ++库,它支持python。我能够成功编译,所以librets现在在我的/usr/local/lib/python2.7/dist-packages使用./configure,make和make install命令。

I have a project that requires the use of the libRETS C++ library which supports python. I was able to successfully compile so that librets is now in my /usr/local/lib/python2.7/dist-packages using the ./configure, make and make install commands.

现在对于当前项目,我使用一个virtualenv并使用PyCharm作为IDE进行开发。我不知道如何包括这个库在我的虚拟环境中。有没有办法在我的virtualenv inlcude全球网站包?我需要创建一个指向dist-packages目录中的librets文件的符号链接,或者当我执行configure命令时,我应该指定应该安装哪个软件包?

Now for the current project I am using a virtualenv and doing development using PyCharm as the IDE. I am not sure how to include this library in my virtual environment. Is there a way to inlcude global site packages in my virtualenv? Do I need to create a symbolic link to the librets files in the dist-packages directory, or should I have specified where the package should be installed when I did the configure command?

任何帮助或建议将非常感谢或如果我的问题不清楚,请让我知道我如何可以解释。

Any help or suggestions would be greatly appreciated or if my question is not clear please let me know how I can expound.

推荐答案

我解决了这一点,只需将librets。*文件从我的/ usr / local / lib ...目录直接复制到项目的virtualenv dist-packages目录。

I solved this by simply copying librets.* files from my /usr/local/lib... directory directly into my virtualenv dist-packages directory for the project.

这篇关于在virtualenv中使用c ++编译库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆