我正试图在Ubuntu 12.04上用Python 2.7建立一个virtualenv使用vagrant但有相同的问题.似乎只有当从窗口发出"vagrant up"时才能看到这个问题.解决办法是什么?任何指针?
New python executable in .vagrant-env/bin/python
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 9, in <module>
load_entry_point('virtualenv==1.11.6', 'console_scripts', 'virtualenv')()
File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 824, in main
symlink=options.symlink)
File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 984, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 1404, in install_python
os.symlink(py_executable_base, full_pth)
OSError: [Errno 71] Protocol error
Run Code Online (Sandbox Code Playgroud) 我按照这些说明(https://www.digitalocean.com/community/tutorials/how-to-install-and-use-graphite-on-an-ubuntu-14-04-server)安装statsd和graphite,但我遇到了下面陈述的问题.似乎这不是石墨问题而是python问题.有谁知道如何解决这个问题?
~/build > sudo service carbon-cache start
* Starting Graphite backend daemon carbon-cache
Traceback (most recent call last):
File "/usr/bin/carbon-cache", line 32, in <module>
run_twistd_plugin(__file__)
File "/usr/lib/python2.7/dist-packages/carbon/util.py", line 90, in run_twistd_plugin
config.parseOptions(twistd_options)
File "/usr/local/lib/python2.7/dist-packages/twisted/application/app.py", line 604, in parseOptions
usage.Options.parseOptions(self, options)
File "/usr/local/lib/python2.7/dist-packages/twisted/python/usage.py", line 269, in parseOptions
raise UsageError("Unknown command: %s" % sub)
twisted.python.usage.UsageError: Unknown command: carbon-cache
Run Code Online (Sandbox Code Playgroud) 我正在使用标准的异步发布者示例.我注意到发布者将永远在循环中继续发布相同的消息.所以我评论了来自publish_message的schedule_next_message调用来停止该循环.但我真正想要的只是当用户给它一个"message_body"和"Key"时,publissher才能开始发布
基本上是发布者发布用户输入.
我无法找到如何使发布者实时接收用户输入的任何示例或提示.我是raabitmq,pika,python等的新手
这是我正在谈论的代码片段: -
def publish_message(self):
"""If the class is not stopping, publish a message to RabbitMQ,
appending a list of deliveries with the message number that was sent.
This list will be used to check for delivery confirmations in the
on_delivery_confirmations method.
Once the message has been sent, schedule another message to be sent.
The main reason I put scheduling in was just so you can get a good idea
of how the process is flowing by slowing …
Run Code Online (Sandbox Code Playgroud) 这样做时我得到了这个错误 sudo docker build .
> (3:58:02 PM) njain: tep 28 : RUN python /tmp/setup.py install &&
> python /tmp/buzz/scripts/setuprabbit.py ---> Running in e7afcbda3c75
> Traceback (most recent call last): File "/tmp/setup.py", line 7, in
> <module>
> long_description=open('README.md', 'r').read(), IOError: [Errno 2] No such file or directory: 'README.md' 2014/10/15 15:40:14 The command
> [/bin/sh -c python /tmp/setup.py install && python
> /tmp/buzz/scripts/setuprabbit.py] returned a non-zero code
Run Code Online (Sandbox Code Playgroud)
我的Dockerfile看起来像这样:
ADD buzz /tmp/
# DOCKER-VERSION 0.3.4
#bunch of installs
RUN cd /tmp/ …
Run Code Online (Sandbox Code Playgroud) 在使用Nova boot创建vm时,我正在为它提供一个用户数据脚本(cloud-init脚本).
我想知道的是,如何在云初始化脚本(或任何其他方式)中指定: - 安排一个cron作业每2小时运行一次
假设我想运行"du -s njain /"来每2小时查找一次目录的大小
我知道"runcmd"可以用来做一次..但我如何让它定期运行?du -s ../njain/
我刚刚开始学习Docker,大多数教程都是从以下开始的: docker run -t -i ubuntu /bin/bash
我无法使用它 docker run ubuntu /bin/bash
我能错过什么?
root@njain2:~# docker run -t -i ubuntu /bin/bash
docker - version 1.4
Copyright 2003, Ben Jansens <ben@orodu.net>
Usage: docker [OPTIONS]
Options:
-help Show this help.
-display DISPLAY The X display to connect to.
-border The width of the border to put around the
system tray icons. Defaults to 1.
-vertical Line up the icons vertically. Defaults to
horizontally.
-wmaker WindowMaker mode. This makes docker a
fixed size (64x64) …
Run Code Online (Sandbox Code Playgroud) python ×3
docker ×2
asynchronous ×1
cloud-init ×1
graphite ×1
pika ×1
setup.py ×1
statsd ×1
ubuntu ×1
vagrant ×1
virtualenv ×1