Python Can';在Ubuntu上安装带有pip的Rodeo
我无法在Ubuntu 14.04.2 LTS 64位上安装pip(安装在虚拟机上) 关于信息,我是Python和Ubuntu的初学者,我通过以下步骤安装了pipPython Can';在Ubuntu上安装带有pip的Rodeo,python,python-2.7,ubuntu,pip,ubuntu-14.04,Python,Python 2.7,Ubuntu,Pip,Ubuntu 14.04,我无法在Ubuntu 14.04.2 LTS 64位上安装pip(安装在虚拟机上) 关于信息,我是Python和Ubuntu的初学者,我通过以下步骤安装了pip pip-V pip6.1.1来自/usr/local/lib/python2.7/dist-packages(python2.7) 问题: 当我执行pip安装-U rodeo时,我收到一条错误消息。以下是日志: Did not find libzmq via pkg-config: Package libzmq was not fou
pip-V
pip6.1.1来自/usr/local/lib/python2.7/dist-packages(python2.7)
问题:
当我执行pip安装-U rodeo
时,我收到一条错误消息。以下是日志:
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
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -c build/temp.linux-x86_64-2.7/scratch/check_sys_un.c -o build/temp.linux-x86_64-2.7/scratch/check_sys_un.o
x86_64-linux-gnu-gcc -pthread build/temp.linux-x86_64-2.7/scratch/check_sys_un.o -o build/temp.linux-x86_64-2.7/scratch/check_sys_un
Configure: Autodetecting ZMQ settings...
Custom ZMQ dir:
************************************************
creating build/temp.linux-x86_64-2.7/scratch/tmp
cc -c /tmp/timer_createSSuyTd.c -o build/temp.linux-x86_64-2.7/scratch/tmp/timer_createSSuyTd.o
cc build/temp.linux-x86_64-2.7/scratch/tmp/timer_createSSuyTd.o -o build/temp.linux-x86_64-2.7/scratch/a.out
build/temp.linux-x86_64-2.7/scratch/tmp/timer_createSSuyTd.o: In function `main':
timer_createSSuyTd.c:(.text+0x15): undefined reference to `timer_create'
collect2: error: ld returned 1 exit status
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Izmq/utils -Izmq/backend/cython -Izmq/devices -c build/temp.linux-x86_64-2.7/scratch/vers.c -o build/temp.linux-x86_64-2.7/scratch/vers.o
build/temp.linux-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 'x86_64-linux-gnu-gcc' failed with exit status 1
Failed with default libzmq, trying again with /usr/local
Configure: Autodetecting ZMQ settings...
Custom ZMQ dir: /usr/local
************************************************
cc -c /tmp/timer_createcU4dvG.c -o build/temp.linux-x86_64-2.7/scratch/tmp/timer_createcU4dvG.o
Assembler messages:
Fatal error: can't create build/temp.linux-x86_64-2.7/scratch/tmp/timer_createcU4dvG.o: No such file or directory
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -c build/temp.linux-x86_64-2.7/scratch/vers.c -o build/temp.linux-x86_64-2.7/scratch/vers.o
build/temp.linux-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 'x86_64-linux-gnu-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: 1: ./configure: not found
staging platform.hpp from: buildutils/include_linux
checking for timer_create
************************************************
************************************************
creating build/temp.linux-x86_64-2.7/tmp
cc -c /tmp/timer_createmVaK_l.c -o build/temp.linux-x86_64-2.7/tmp/timer_createmVaK_l.o
cc build/temp.linux-x86_64-2.7/tmp/timer_createmVaK_l.o -o build/temp.linux-x86_64-2.7/a.out
build/temp.linux-x86_64-2.7/tmp/timer_createmVaK_l.o: In function `main':
timer_createmVaK_l.c:(.text+0x15): undefined reference to `timer_create'
collect2: error: ld returned 1 exit status
no timer_create, linking librt
Using bundled libsodium
already have bundled/libsodium
staging buildutils/include_sodium/version.h to bundled/libsodium/src/libsodium/include/sodium/version.h
already have crypto_scalarmult_curve25519.h
already have crypto_stream_salsa20.h
************************************************
************************************************
building 'zmq.libsodium' extension
creating build/temp.linux-x86_64-2.7/buildutils
creating build/temp.linux-x86_64-2.7/bundled
creating build/temp.linux-x86_64-2.7/bundled/libsodium
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_verify
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_verify/32
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_verify/32/ref
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_verify/16
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_verify/16/ref
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_verify/64
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_verify/64/ref
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_sign
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_sign/ed25519
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_sign/ed25519/ref10
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_core
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_core/hsalsa20
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_core/hsalsa20/ref2
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_core/salsa2012
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_core/salsa2012/ref
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_core/salsa208
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_core/salsa208/ref
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_core/salsa20
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_core/salsa20/ref
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/sodium
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_aead
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_aead/chacha20poly1305
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_scalarmult
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_scalarmult/curve25519
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_auth
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_auth/hmacsha512
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_auth/hmacsha512/cp
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_auth/hmacsha512256
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_auth/hmacsha512256/cp
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_auth/hmacsha256
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_auth/hmacsha256/cp
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/randombytes
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/randombytes/sysrandom
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/randombytes/salsa20
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_pwhash
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_generichash
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_generichash/blake2
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_generichash/blake2/ref
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_hash
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_hash/sha512
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_hash/sha512/cp
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_hash/sha256
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_hash/sha256/cp
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_onetimeauth
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_onetimeauth/poly1305
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_box
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_stream
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_stream/xsalsa20
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_stream/xsalsa20/ref
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_stream/salsa2012
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_stream/salsa2012/ref
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_stream/aes128ctr
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_stream/aes128ctr/portable
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_stream/chacha20
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_stream/chacha20/ref
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_stream/salsa208
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_stream/salsa208/ref
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_stream/salsa20
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_stream/salsa20/ref
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_shorthash
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_shorthash/siphash24
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_shorthash/siphash24/ref
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_secretbox
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305
creating build/temp.linux-x86_64-2.7/bundled/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DNATIVE_LITTLE_ENDIAN=1 -Ibundled/libsodium/src/libsodium/include -Ibundled/libsodium/src/libsodium/include/sodium -I/usr/include/python2.7 -c buildutils/initlibsodium.c -o build/temp.linux-x86_64-2.7/buildutils/initlibsodium.o
buildutils/initlibsodium.c:10:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_ricol/pyzmq/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-KXbrbW-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_ricol/pyzmq
Storing debug log for failure in /home/ricol/.pip/pip.log
但是当我执行rodeo.
时仍然存在问题,即使在重新启动之后:
ricol@ricol-VirtualBox:~$ rodeo .
_______ ___ ______ ________ ___
|_ __ \ .' `.|_ _ `.|_ __ | .' `.
| |__) | / .-. \ | | `. \ | |_ \_|/ .-. \
| __ / | | | | | | | | | _| _ | | | |
_| | \ \_\ `-' /_| |_.' /_| |__/ |\ `-' /
|____| |___|`.___.'|______.'|________| `.___.'
''''''''''''''''''''''''''''''''''''''''''''''''''
URL: http://localhost:5000/
DIRECTORY: /home/ricol
''''''''''''''''''''''''''''''''''''''''''''''''''
(process:2429): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs<@resource://unity/observer.js:38:71
Observer.prototype.observe@resource://unity/observer.js:77:24
get_contentWindow@chrome://global/content/bindings/browser.xml:412:54
get_securityUI@chrome://global/content/bindings/browser.xml:662:17
browser_XBL_Constructor@chrome://global/content/bindings/browser.xml:786:17
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs<@resource://unity/observer.js:38:71
Observer.prototype.observe@resource://unity/observer.js:77:24
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs<@resource://unity/observer.js:38:71
Observer.prototype.observe@resource://unity/observer.js:77:24
[ERROR]: Exception on / [GET]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python2.7/dist-packages/rodeo/rodeo.py", line 33, in home
dirslug = slugify.slugify(dirname)
File "/usr/local/lib/python2.7/dist-packages/slugify.py", line 26, in slugify
unicodedata.normalize('NFKD', string)
TypeError: must be unicode, not str
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs<@resource://unity/observer.js:38:71
Observer.prototype.observe@resource://unity/observer.js:77:24
@chrome://browser/content/content.js:37:5
addTab@chrome://browser/content/tabbrowser.xml:1642:13
ssi_restoreWindow@resource:///modules/sessionstore/SessionStore.jsm:2292:1
ssi_onLoad@resource:///modules/sessionstore/SessionStore.jsm:782:11
SessionStoreInternal.onBeforeBrowserWindowShown/<@resource:///modules/sessionstore/SessionStore.jsm:948:9
Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:865:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:744:7
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs<@resource://unity/observer.js:38:71
Observer.prototype.observe@resource://unity/observer.js:77:24
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs<@resource://unity/observer.js:38:71
Observer.prototype.observe@resource://unity/observer.js:77:24
ricol@ricol-虚拟箱:~$rodeo。
_______ ___ ______ ________ ___
|_ __ \ .' `.|_ _ `.|_ __ | .' `.
| |__) | / .-. \ | | `. \ | |_ \_|/ .-. \
| __ / | | | | | | | | | _| _ | | | |
_| | \ \_\ `-' /_| |_.' /_| |__/ |\ `-' /
|____| |___|`.___.'|______.'|________| `.___.'
''''''''''''''''''''''''''''''''''''''''''''''''''
网址:http://localhost:5000/
目录:/home/ricol
''''''''''''''''''''''''''''''''''''''''''''''''''
(进程:2429):GLib CRITICAL**:g\u slice\u set\u config:assertion'sys\u page\u size==0'失败
警告:内容窗口已传递给PrivateBrowsingUtils.isWindowPrivate。改用isContentWindowPrivate(但仅适用于框架脚本)。
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
pbs您需要安装python-dev/libzmq-dev才能成功安装。问题是,尽管可以使用PIP安装大多数Python库,但其中一些依赖于C或C++库。这些库无法使用PIP下载,因此需要手动安装
由于PIP只安装Python库,因此必须使用apt get安装任何外部依赖项。在这种情况下,您需要zmq和/或python的开发库
sudo apt-get install libzmq-dev
和/或
sudo apt-get install python-dev
从Rodeo v2.0开始,它不再可以通过pip安装。在Ubuntu上,您可以使用Rodeo apt repo安装它,命令如下:
#### add the yhat public key and the repo
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 33D40BC6
sudo add-apt-repository -u "deb http://rodeo-deb.yhat.com/ rodeo main"
#### install rodeo and run it
sudo apt-get -y install rodeo
/opt/Rodeo/rodeo
这个问题在错误的部分。试着在上面发帖。我相信你会得到你需要的答案。你有日志中写的Python和ZMQ的开发版本吗?我不知道Ubuntu中的包名是什么,但它应该类似于python-devel
。我在执行它时有一条错误消息:E:无效操作python-dev
@Ricol:Try now,我有一个输入错误,缺少安装。你需要像sudo一样运行pip<代码>sudo pip安装-U rodeo
。不允许PIP写入新文件,权限被拒绝
。谢谢!安装似乎正常,但当我想用rodeo加载rodeo时,我收到了另一条错误消息。
(请参阅编辑的帖子)Install slagify=]sudo pip Install slagify
。
#### add the yhat public key and the repo
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 33D40BC6
sudo add-apt-repository -u "deb http://rodeo-deb.yhat.com/ rodeo main"
#### install rodeo and run it
sudo apt-get -y install rodeo
/opt/Rodeo/rodeo