1

我正在尝试在我的 Ubuntu 14.04 上安装 pylearn2。但是,当我键入“python setup.py develop”命令并出现 nvcc&x86_64-linux-gnu-gcc 致命错误时,安装失败。

joeson@joeson-Lenovo-G40-70m:~/KuaiPan/MachineLearning/Deep Learning/Practical Implementation/Deep Reinforcement Learning/deep_q_rl-master/build/pylearn2$ ***sudo python setup.py develop***

我收到一个 nvcc 编译器错误,指出找不到 $PATH

**ERROR (theano.sandbox.cuda): nvcc compiler not found on $PATH. Check your nvcc installation and try again.**
running develop
running egg_info
writing requirements to pylearn2.egg-info/requires.txt
writing pylearn2.egg-info/PKG-INFO
writing top-level names to pylearn2.egg-info/top_level.txt
writing dependency_links to pylearn2.egg-info/dependency_links.txt
reading manifest file 'pylearn2.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pylearn2.egg-info/SOURCES.txt'
running build_ext
skipping 'pylearn2/utils/_window_flip.c' Cython extension (up-to-date)
building 'pylearn2.utils._window_flip' extension
C compiler: x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC

我认为有一些已弃用的 Numpy 软件包会导致安装过程失败。

compile options: '-I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c'
x86_64-linux-gnu-gcc: pylearn2/utils/_window_flip.c
In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0,
                 from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:17,
                 from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from pylearn2/utils/_window_flip.c:352:
    ***/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     #warning "Using deprecated NumPy API, disable it by " \
      ^***

    In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:26:0,
                     from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from pylearn2/utils/_window_flip.c:352:
    /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/__multiarray_api.h:1629:1: warning: ‘_import_array’ defined but not used [-Wunused-function]
         _import_array(void)
         ^

        In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ufuncobject.h:327:0,
    from pylearn2/utils/_window_flip.c:353:/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/__ufunc_api.h:241:1: warning: '_import_umath' defined but not used [-Wunused-function]
     _import_umath(void)

我不知道 x86_64-linux-gnu-gcc 发生了什么,是否发生了一些致命错误?

`***x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/pylearn2/utils/_window_flip.o -o***` 

    /home/joeson/KuaiPan/MachineLearning/Deep Learning/Practical Implementation/Deep Reinforcement Learning/deep_q_rl-master/build/pylearn2/pylearn2/utils/_window_flip.so

然后系统无法创建以下目录

     x86_64-linux-gnu-gcc: error: Learning/Practical: no such file or directory


     x86_64-linux-gnu-gcc: error: Implementation/Deep: no such file or directory
    x86_64-linux-gnu-gcc: error: Reinforcement: no such file or directory


     x86_64-linux-gnu-gcc:error:Learning/deep_q_rl-master/build/pylearn2/pylearn2/utils/_window_flip.so:no such file or directory


     ***x86_64-linux-gnu-gcc: error: Learning/Practical: no such file or directory
    x86_64-linux-gnu-gcc: error: Implementation/Deep: no such file or directory
    x86_64-linux-gnu-gcc: error: Reinforcement: no such file or directory
    x86_64-linux-gnu-gcc: error: Learning/deep_q_rl-master/build/pylearn2/pylearn2/utils/_window_flip.so: no such file or directory***

    error: Command "x86_64-linux-gnu-gcc" -pthread -shared -Wl,-O1 -Wl,-

    Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-

    aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -
    D_FORTIFY_SOURCE=2

    ***-g -fstack-protector --param=ssp-buffer-size=4 -***


    "Wformat-Werror=format-security build/temp.linux-x86_642.7/pylearn2/utils/_window_flip.o -o"

    /home/joeson/KuaiPan/MachineLearning/Deep Learning/Practical Implementation/Deep Reinforcement Learning/deep_q_rl-master/build/pylearn2/pylearn2/utils/_window_flip.so" failed with exit status 1
4

0 回答 0