目前我正在尝试在Ubuntu 16.04上安装python包pylearn2。在线我发现了两种应该有效的方法:
sudo pip install git+git://github.com/lisa-lab/pylearn2.git
这样:
git clone git://github.com/lisa-lab/pylearn2.git
cd ./pylearn2/
python setup.py develop
但无论如何都没有。第一种方法作为输出:
The directory '/home/myUser/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/myUser/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting git+git://github.com/lisa-lab/pylearn2.git
Cloning git://github.com/lisa-lab/pylearn2.git to /tmp/pip-Tnu1do-build
Requirement already satisfied (use --upgrade to upgrade): pylearn2==0.1.dev0 from git+git://github.com/lisa-lab/pylearn2.git in /home/myUser/Documents/python downloads/pylearn2
Requirement already satisfied: numpy>=1.5 in /usr/lib/python2.7/dist-packages (from pylearn2==0.1.dev0)
Requirement already satisfied: pyyaml in /usr/local/lib/python2.7/dist-packages/PyYAML-3.12-py2.7-linux-x86_64.egg (from pylearn2==0.1.dev0)
Requirement already satisfied: argparse in /usr/lib/python2.7 (from pylearn2==0.1.dev0)
Requirement already satisfied: Theano in /usr/local/lib/python2.7/dist-packages (from pylearn2==0.1.dev0)
Requirement already satisfied: scipy>=0.11 in /usr/lib/python2.7/dist-packages (from Theano->pylearn2==0.1.dev0)
Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python2.7/dist- packages (from Theano->pylearn2==0.1.dev0)
我希望在此之后有关于安装pylearn2或关于错误的消息,但两者都不会发生。第二种方法确实会出错:
/usr/local/lib/python2.7/dist-packages/setuptools/dist.py:332: UserWarning: Normalizing '0.1dev' to '0.1.dev0'
normalized_version,
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 -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC
compile options: '-I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c'
Warning: Can`t read registry to find the necessary compiler setting
Make sure that Python modules _winreg, win32api or win32con are installed.
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:1777:0,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from pylearn2/utils/_window_flip.c:274:
/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:27:0,
from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from pylearn2/utils/_window_flip.c:274:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/__multiarray_api.h:1448:1: warning: ‘_import_array’ defined but not used [-Wunused-function]
_import_array(void)
^
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 -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/pylearn2/utils/_window_flip.o -o /home/myUser/Documents/python downloads/pylearn2/pylearn2/utils/_window_flip.so
x86_64-linux-gnu-gcc: error: downloads/pylearn2/pylearn2/utils/_window_flip.so: No such file or directory
x86_64-linux-gnu-gcc: error: downloads/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 -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/pylearn2/utils/_window_flip.o -o /home/myUser/Documents/python downloads/pylearn2/pylearn2/utils/_window_flip.so" failed with exit status 1
我认为问题可能在于:
x86_64-linux-gnu-gcc: error: downloads/pylearn2/pylearn2/utils/_window_flip.so: No such file or directory
x86_64-linux-gnu-gcc: error: downloads/pylearn2/pylearn2/utils/_window_flip.so: No such file or directory
有没有人对这里可能出现的问题有更深入的了解?