帮助设置配置文件并运行代码

帮助设置配置文件并运行代码

我对 Linux 还不太熟悉,想运行一些代码。尝试了几天却没有成功,希望有人能帮助我。我的 Linux 版本是

描述:Ubuntu 16.04.1 LTS 发布:16.04 代号:xenial

代码在这里:https://bitbucket.org/dsign/gecmi/wiki/Home

我的问题在于修改配置文件:site_config.py,开发人员说我应该:

检查此文件并以与您的构建环境、您想要编译的目标以及您想要安装它们的位置相匹配的方式进行编辑。

首先,我尝试通过 apt-get 安装 boost、itbb、scons 和 numpy/scipy 库

sudo apt-get install libboost-dev
sudo apt-get install scons
sudo apt-get install python-scipy
sudo apt-get install python-numpy
sudo apt-get install libtbb-dev

我不确定这些是否是正确的版本,但这是我经过一番研究后发现的。

下一步是调整配置文件中的条目,但我发现很难(实际上我没有太多的线索)找出安装上述库后所有这些目录的位置或如何分别调整此配置文件:

# Use 'release' for speed, 'debug' for debugging.
COMPILE_MODE='release'
# Use one or both of the following words: 'standalone' for 
# building the standalone executable, 'python' for building
# the python module
COMPILE_TARGETS='standalone python'
# Where the boost library is installed. I expect an 'include'
# and a 'lib' dir below.
BOOST_ROOT='/opt/boost_1_47_0/'
# The prefix of the python installation. This is used for deducing
# include directories and lib path of python
PYTHON_PREFIX="/usr/"
# The python's version. Used for deducing include directories and 
# library name of python.
PYTHON_VERSION ="2.7"
# Where the Intel threading building blocks is installed. I expect
# and 'include' and a 'lib' directory below this one.
TBB_PREFIX="/home/alcides/programming/projects/sci_python/prx"
# The executable for the c++ compiler to use. 
COMPILER_NAME="g++-4.6"
# The place where numpy is installed. I expect the directories 
# 'core/include' and 'numarray/include' below.
NUMPY_PREFIX="/usr/local/lib/python2.7/dist-packages/numpy/"

# Where you sould like the standalone program to be installed
GECMI_PROGRAM_INSTALL_AT='/usr/local/bin'
# Where you would like the shared library to be installed. This
# library is used by both the python module and the standalone 
# program.
GECMI_LIB_INSTALL_AT='/usr/local/lib'
# Where would you like to have the module installed, for the 
# target 'InstallPythonModule'. A dll file called gecmi.{dllext}
# is installed there. 
PYTHON_MODULE_INSTALL_AT='/usr/lib/python2.7/dist-packages'

作者的提示是修改 LD_LIBRARY_PATH 变量,但对我也没有太大帮助:

如果依赖项未正确安装,则加载共享库时可能会收到错误类型的消息。在这种情况下,您可能需要摆弄命令locate和环境变量LD_LIBRARY_PATH,或您选择的操作系统中的等效项。

我尝试使用 whereis 和 location,但不确定是否可行。例如,当我使用whereis boost或 locate boost时,我找到了很多目录,但没有找到配置文件似乎需要的目录,如boost/includeboost/lib。对于 numpy,没有numarray/include文件夹 asf。

所以基本上我想知道 Linux 高级用户如何找到所有必要的路径和目录并找出如何运行此代码(或者你们中的一些人是否可以运行该代码)。我也非常感谢有关如何更熟悉解决此类问题的进一步信息/教程/建议。

谢谢!

相关内容