Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/149.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 使用特定编译器安装pip_C++_Pip - Fatal编程技术网

C++ 使用特定编译器安装pip

C++ 使用特定编译器安装pip,c++,pip,C++,Pip,当我在群集中安装pip时(我的群集中设计为使用英特尔编译器icpc),我会遇到以下错误: $ pip install cvxopt --user Collecting cvxopt Using cached cvxopt-1.1.8.tar.gz Building wheels for collected packages: cvxopt Running setup.py bdist_wheel for cvxopt ... error Complete output from co

当我在群集中安装
pip
时(我的群集中设计为使用英特尔编译器icpc),我会遇到以下错误:

$ pip install cvxopt --user
Collecting cvxopt
  Using cached cvxopt-1.1.8.tar.gz
Building wheels for collected packages: cvxopt
  Running setup.py bdist_wheel for cvxopt ... error
  Complete output from command /share/apps/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-sxngrO/cvxopt/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpTcH01Zpip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-2.7
  creating build/lib.linux-x86_64-2.7/cvxopt
  copying src/python/coneprog.py -> build/lib.linux-x86_64-2.7/cvxopt
  copying src/python/printing.py -> build/lib.linux-x86_64-2.7/cvxopt
  copying src/python/msk.py -> build/lib.linux-x86_64-2.7/cvxopt
  copying src/python/misc.py -> build/lib.linux-x86_64-2.7/cvxopt
  copying src/python/__init__.py -> build/lib.linux-x86_64-2.7/cvxopt
  copying src/python/cvxprog.py -> build/lib.linux-x86_64-2.7/cvxopt
  copying src/python/info.py -> build/lib.linux-x86_64-2.7/cvxopt
  copying src/python/modeling.py -> build/lib.linux-x86_64-2.7/cvxopt
  copying src/python/solvers.py -> build/lib.linux-x86_64-2.7/cvxopt
  running build_ext
  building 'base' extension
  creating build/temp.linux-x86_64-2.7
  creating build/temp.linux-x86_64-2.7/src
  creating build/temp.linux-x86_64-2.7/src/C
  gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/share/apps/include/python2.7 -c src/C/base.c -o build/temp.linux-x86_64-2.7/src/C/base.o
  gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/share/apps/include/python2.7 -c src/C/dense.c -o build/temp.linux-x86_64-2.7/src/C/dense.o
  gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/share/apps/include/python2.7 -c src/C/sparse.c -o build/temp.linux-x86_64-2.7/src/C/sparse.o
  gcc -pthread -shared build/temp.linux-x86_64-2.7/src/C/base.o build/temp.linux-x86_64-2.7/src/C/dense.o build/temp.linux-x86_64-2.7/src/C/sparse.o -L/usr/lib -lm -llapack -lblas -o build/lib.linux-x86_64-2.7/cvxopt/base.so
  /usr/bin/ld: cannot find -llapack
  collect2: ld returned 1 exit status
  error: command 'gcc' failed with exit status 1
我认为可能有两个问题:

  • 它使用的是
    gcc
    而不是
    icpc
    ,这正是我们集群设置的目的。。。所以问题是,是否可以为我的所有安装指定icpc

  • /usr/bin/ld:找不到-未找到llapack:lapack库
    。。。缺少Lapack库。。。由于我不想从源代码安装,是否有某种方法可以使用PackageManager安装所有这些依赖项?多谢各位


  • 我认为您可以通过
    CC
    环境变量指定编译器。所以类似于
    CC=icpc-pip-install-cvxopt
    的东西应该可以工作。你用的是什么系统?Lapack和其他软件可以通过存储库包在大多数系统上使用……它实际上是我小组中的一个linux集群。你知道我如何在没有root(也不要求管理员)的情况下自己(比如pip)安装lapack吗?我一直在为我的团队处理类似的事情。你可以看看我的网站。该列表中的所有内容都安装到
    ~/.local
    中,无需root权限。文档不完整,可能有点过时,但是您可能会发现它很有用。如果您有任何问题,请随时与我联系。