Tag: pip

在docker python上安装libLAS – 没有这样的文件或目录

我在docker工作在Python中,我需要添加包libLAS。 我通常只是添加一个简单的线到我的docker文件,对于libLAS它会是: Run pip install liblas Docker似乎能够构build图像,但是当我使用下面的代码运行python脚本时: import liblas 它给出了错误: Traceback (most recent call last): File "/src/test.py", line 6, in <module> import liblas File "/usr/local/lib/python2.7/dist-packages/liblas/__init__.py", line 2, in <module> from .core import get_version File "/usr/local/lib/python2.7/dist-packages/liblas/core.py", line 158, in <module> las = ctypes.CDLL(lib_name) File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__ self._handle = _dlopen(self._name, mode) OSError: liblas_c.so.3: cannot […]

在Docker Container中安装pip时出错

所以我试图通过首先复制安装文件来在Docker容器中下载pip docker cp get-pip.py dock:get-pip.py 然后我走进集装箱 docker执行官 – 这是58 bash 然后我试图pythonget-pip.py文件,我得到以下错误。 在连接被“NewConnectionError(':build立一个新的连接失败:[Errno -3]临时失败的名称parsing',)中断连接后重试(重试(总= 4,连接=无,读=无,redirect=无) ':/ simple / pip /

修改在Docker镜像中使用pip安装的python文件

我在docker中使用RUN pip install requests-aws4auth安装了一个名为requests-aws4auth的python模块 现在我想通过进入cd /opt/conda/lib/python2.7/site-packages/requests_aws4auth/并注释aws4auth.py文件中的一行来修改它。 在构builddocker的时候,我已经安装了vim。 在构builddockerfile的时候可以这样做吗? 如果是,那么有人可以帮我一把。 我可以通过使用sudo docker run -i -t image_name /bin/bash并修改文件来实现,但是这会创build一个容器。 现在,有没有办法将容器推回到图像上。

项目的目录结构与Dockerfile,Jekinsfile,Kubernetes部署yaml,pip requirements.txt和testing脚本?

下面的目录结构是否可以工作? 目标是让Jenkins触发GitHub提交并运行构build和testing容器的多分支pipe道。 (我拥有包括Jenkins在内的所有Kubernetes) /project .git README.md Jenkinsfile /docker_image_1 Dockerfile app1.py requirements.txt /unit_tests unit_test1.py unit_test2.py /docker_image_2 Dockerfile app2.py requirements.txt /unit_tests unit_test1.py unit_test2.py /k8s /dev deployment.yaml /production deployment.yaml /component_tests component_tests.py 是否在正确的位置有deployment.yamls的k8s文件夹? testing文件夹是否位于好的位置? “component_tests”中的testing最好是进行更多涉及多个容器的端到端集成testing 我看到很多repos有Jenkins文件和Dockerfile在同一目录级别。 那有什么优点和缺点?

python TypeError:必须是没有NULL字节的编码string,而不是str – docker iron requirements.txt

我一直在试图部署一个python脚本到Iron.io. 他们build议在上传之前使用docker进行本地testing。 我已经完成了他们提供的docker / iron教程,没有错误。 所以我开始修改从他们的示例回购提供的requirements.txt来启动我自己的项目,但每当我尝试在本地安装包,我收到一个TypeError。 我的点是版本: pip 7.1.2 from /Library/Python/2.7/site-packages (python 2.7) 他们的要求.txt iron-mq>=0.5 iron-worker>=1.3.1 我的requirements.txt iron-mq>=0.5 iron-worker>=1.3.1 beautifulsoup4 html5lib terminal命令: $ docker run –rm -v "$PWD":/worker -w /worker iron/python:2-dev pip install -t packages -r requirements.txt 错误: Exception: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 211, in main status = self.run(options, args) File […]

如何在谷歌云端运行从私人回购安装点要求?

我正在尝试构build一个Dockerfile,通过pip将需求安装到它构build的容器中。 我认为在google的SDK /云端控制台中可能没有设置正确的东西。 我得到这个错误: me@cloud-q2smart:~/github/jokepkg/test$ sudo pip install -r test-ggl-install/requirements.txt Obtaining funniest from git+https://source.developers.google.com/p/cloud-q2smart/r/jokepkg#egg=funniest-0.1 (from -r test-ggl-install/requirements.txt (line 1)) Updating ./src/funniest clone git: 'credential-gcloud.sh' is not a git command. See 'git –help'. Username for 'https://source.developers.google.com': 该消息看起来像是什么东西试图通过“credential-gcloud.sh”git,和git是响应,它不知道这是什么意思。 它看起来像谷歌已经build立了authentication的一些内部手段被打破。 我真的想要从私人回购正确安装。 我不希望开发团队只是因为authentication机制被破坏而不得不改变他们的stream程到更麻烦的地步。 …但这很棘手…因为pip在幕后调用git,而且看起来谷歌正在试图在幕后做一些事情来告诉git如何进行身份validation。 我创build了一个项目,试图在谷歌云源中的私人回购安装一个简单的Python包。 运行它的说明如下: ( Start up google cloud shell ) $ git clone https://github.com/jnorment-q2/jokepkg.git # pull […]

Docker生成期间的gcloud连接问题

在我的Dockerfile中的pip install requirements.txt步骤中,Google Cloud Shell断开连接。 错误消息是: The connection to your Google Cloud Shell was lost. 错误发生之前的日志是: Step 3 : WORKDIR /app —> Running in fd690eb34995 —> 565d7a3d5ce1 Removing intermediate container fd690eb34995 Step 4 : RUN pip install -r requirements.txt —> Running in 18e2513dcbe8 Collecting Flask (from -r requirements.txt (line 1)) Downloading Flask-0.12.2-py2.py3-none-any.whl (83kB) Collecting pandas […]

Docker链接到构build的现有容器或图像

我正在尝试使用2个Dockerfiles将app分隔成app图像和database图像。 两者都使用FROM debian:jessie作为基础映像。 我遇到的问题是app映像中的某些包需要知道构build时的数据库位置。 有没有办法将生成命令链接到现有的图像或容器? 细节 我的database映像是我已经成功构build的HDF5数据存储。 我的app图像是一个Python 3.5映像,它安装了用于处理HDF5包。 我正在build立的错误是: Step 15 : RUN pip install tables —> Running in 9ea6d6b53a19 Collecting tables Downloading tables-3.2.2.tar.gz (7.0MB) Complete output from command python setup.py egg_info: /usr/bin/ld: cannot find -lhdf5 collect2: error: ld returned 1 exit status * Using Python 3.5.1 (default, Jan 13 2016, 18:51:24) * USE_PKGCONFIG: […]

在dockerfile中cachingPIP包

我正在尝试为我的python项目设置docker,该项目使用虚拟环境,并在requirements.txt定义了一些依赖关系。 我也设置了Dockerfile docker-compose ,它使用Dockerfile来使用命令build立我的项目图像Dockerfile docker-compose up –build 我的Dockerfile: FROM ubuntu:16.04 FROM python:3.5 MAINTAINER **** ADD . /core-proejct WORKDIR /core-project RUN pip3 install virtualenv RUN . /bin/activate RUN pip install -r requirements.txt 所以,每当我尝试构build映像时,它都会从requirements.txt安装所有的pip模块。 无论如何,我可以cachingpip模块,并在构build映像时使用caching版本。

pip安装django-allauth UnicodeDecodeError

我试图用Python 3.3.2在docker容器中安装django-allauth,并得到一个Unicode解码错误。 https://dpaste.de/JaXg它正确安装在我的Mac …任何想法? 用Docker在里面运行Vagrant。 Vagrant运行的是精确的,我的docker容器是从这个docker索引( https://index.docker.io/u/xdrum/ubuntu10.04-base/ )的xdrum / ubuntu10.04-base。 在Docker容器中执行一个虚拟env的pip安装。 PIP版本1.4.1和Python 3.3.2。 在我的Mac上,django-allauth在os x虚拟环境中安装得很好。 真的很难找出这一个,所以谢谢你的帮助!