I am trying to run ipython notebook in cywgin. for this to work i need to install pyzmq. However this isnt working. i have attched the problem bellow, can anyone help?
我试着在cywgin运行ipython笔记本。为此,我需要安装pyzmq。然而,这不是工作。我已经解决了这个问题,有人能帮忙吗?
$ easy_install pyzmq
Searching for pyzmq
Reading http://pypi.python.org/simple/pyzmq/
Reading http://github.com/zeromq/pyzmq
Reading http://github.com/zeromq/pyzmq/downloads
Reading http://github.com/zeromq/pyzmq/releases
Best match: pyzmq 14.0.1
Downloading https://pypi.python.org/packages/source/p/pyzmq/pyzmq-14.0.1.zip#md5=014e44ddcb1ede81a9087af5ec49470d
Processing pyzmq-14.0.1.zip
Writing /tmp/easy_install-CZx3rY/pyzmq-14.0.1/setup.cfg
Running pyzmq-14.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-CZx3rY/pyzmq-14.0.1/egg-dist-tmp-E_MUa0
no previously-included directories found matching 'docs/build'
no previously-included directories found matching 'docs/gh-pages'
warning: no directories found matching 'bundled/uuid'
warning: no previously-included files found matching 'bundled/uuid/Makefile*'
warning: no previously-included files found matching 'bundled/zeromq/src/Makefile*'
warning: no previously-included files found matching 'bundled/zeromq/src/platform.hpp'
warning: no previously-included files found matching 'zmq/libzmq*'
warning: no previously-included files matching '__pycache__/*' found anywhere in distribution
warning: no previously-included files matching '.deps/*' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '.DS_Store' found anywhere in distribution
warning: no previously-included files matching '.mailmap' found anywhere in distribution
Did not find libzmq via pkg-config:
Package libzmq was not found in the pkg-config search path.
Perhaps you should add the directory containing `libzmq.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libzmq' found
************************************************
Configure: Autodetecting ZMQ settings...
Custom ZMQ dir:
build/temp.cygwin-1.7.27-x86_64-2.7/scratch/vers.c:4:17: fatal error: zmq.h: No such file or directory
#include "zmq.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
Failed with default libzmq, trying again with /usr/local
************************************************
Configure: Autodetecting ZMQ settings...
Custom ZMQ dir: /usr/local
build/temp.cygwin-1.7.27-x86_64-2.7/scratch/vers.c:4:17: fatal error: zmq.h: No such file or directory
#include "zmq.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
************************************************
Warning: Failed to build or run libzmq detection test.
If you expected pyzmq to link against an installed libzmq, please check to make sure:
* You have a C compiler installed
* A development version of Python is installed (including headers)
* A development version of ZMQ >= 2.1.4 is installed (including headers)
* If ZMQ is not in a default location, supply the argument --zmq=<path>
* If you did recently install ZMQ to a default location,
try rebuilding the ld cache with `sudo ldconfig`
or specify zmq's location with `--zmq=/usr/local`
You can skip all this detection/waiting nonsense if you know
you want pyzmq to bundle libzmq as an extension by passing:
`--zmq=bundled`
I will now try to build libzmq as a Python extension
unless you interrupt me (^C) in the next 10 seconds...
1...
************************************************
Using bundled libzmq
already have bundled/zeromq
attempting ./configure to generate platform.hpp
Warning: failed to configure libzmq:
/bin/sh: ./configure: No such file or directory
staging platform.hpp from: /tmp/easy_install-CZx3rY/pyzmq-14.0.1/buildutils/include_linux
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lsodium
collect2: error: ld returned 1 exit status
Warning: libsodium not found, zmq.CURVE security will be unavailable
************************************************
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from bundled/zeromq/src/poller.hpp:42:0,
from bundled/zeromq/src/socket_base.hpp:30,
from bundled/zeromq/src/ctx.cpp:31:
bundled/zeromq/src/epoll.hpp:28:23: fatal error: sys/epoll.h: No such file or directory
#include <sys/epoll.h>
^
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
2 个解决方案
#1
0
I just went through the same process. As the PyZMQ Readme.md says:
我只是经历了同样的过程。PyZMQ Readme。医学博士说:
When compiling pyzmq (e.g. installing with pip on Linux), it is generally recommended that zeromq be installed separately, via homebrew, apt, yum, etc. If this is not available, pyzmq will try to build libzmq as a Python Extension, though this is not guaranteed to work.
在编译pyzmq(例如在Linux上安装pip)时,通常建议将zeromq单独安装,通过homebrew、apt、yum等。如果这是不可用的,pyzmq将尝试将libzmq构建为Python扩展,尽管这不能保证工作。
So as in my case, in your case it didn't work. You can either use Cygwin to install zeromq or download it yourself: http://zeromq.org/intro:get-the-software (I went for the latest, Stable Release 4.0.4)
在我的例子中,在你的例子中它不起作用。你可以使用Cygwin来安装zeromq或者自己下载:http://zeromq.org/intro:get-the-software(我去了最新的,稳定版4.0.4)
unztar, configure (--prefix=/my/home/local
if you wish), make install
unztar, configure(-前缀=/my/home/local if you wish),进行安装。
Then you need to export PKG_CONFIG_PATH=/my/home/local/lib/pkgconfig
(or whatever your default lib directory is, e.g. /usr/local/lib/pkgconfig
).
然后需要导出PKG_CONFIG_PATH=/ home/local/lib/pkgconfig(或者任何默认的lib目录,例如/usr/local/lib/pkgconfig)。
Make sure this path exists:
确保这条路径存在:
/my/home/local/lib/pkgconfig/libzmq.pc
Finally pip install pyzmq
and it should pick up the libzmq.pc
file you've just built.
最后,pip安装pyzmq,它应该接收libzmq。你刚刚建立的pc文件。
#2
0
Install a pre-compiled windows binary if you are using windows.
如果您正在使用windows,请安装预编译的windows二进制文件。
For example from Gohlke's great directory of windows binaries: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyzmq
例如,从Gohlke的大目录的windows二进制文件:http://www.lfd.uci.edu/~ Gohlke /pythonlibs/#pyzmq。
#1
0
I just went through the same process. As the PyZMQ Readme.md says:
我只是经历了同样的过程。PyZMQ Readme。医学博士说:
When compiling pyzmq (e.g. installing with pip on Linux), it is generally recommended that zeromq be installed separately, via homebrew, apt, yum, etc. If this is not available, pyzmq will try to build libzmq as a Python Extension, though this is not guaranteed to work.
在编译pyzmq(例如在Linux上安装pip)时,通常建议将zeromq单独安装,通过homebrew、apt、yum等。如果这是不可用的,pyzmq将尝试将libzmq构建为Python扩展,尽管这不能保证工作。
So as in my case, in your case it didn't work. You can either use Cygwin to install zeromq or download it yourself: http://zeromq.org/intro:get-the-software (I went for the latest, Stable Release 4.0.4)
在我的例子中,在你的例子中它不起作用。你可以使用Cygwin来安装zeromq或者自己下载:http://zeromq.org/intro:get-the-software(我去了最新的,稳定版4.0.4)
unztar, configure (--prefix=/my/home/local
if you wish), make install
unztar, configure(-前缀=/my/home/local if you wish),进行安装。
Then you need to export PKG_CONFIG_PATH=/my/home/local/lib/pkgconfig
(or whatever your default lib directory is, e.g. /usr/local/lib/pkgconfig
).
然后需要导出PKG_CONFIG_PATH=/ home/local/lib/pkgconfig(或者任何默认的lib目录,例如/usr/local/lib/pkgconfig)。
Make sure this path exists:
确保这条路径存在:
/my/home/local/lib/pkgconfig/libzmq.pc
Finally pip install pyzmq
and it should pick up the libzmq.pc
file you've just built.
最后,pip安装pyzmq,它应该接收libzmq。你刚刚建立的pc文件。
#2
0
Install a pre-compiled windows binary if you are using windows.
如果您正在使用windows,请安装预编译的windows二进制文件。
For example from Gohlke's great directory of windows binaries: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyzmq
例如,从Gohlke的大目录的windows二进制文件:http://www.lfd.uci.edu/~ Gohlke /pythonlibs/#pyzmq。