相关疑难解决方法(0)

Python - 无法在Windows中找到pip.ini或pip.conf

我在我的Win7机器上安装了Python 2.7.8,它已预先安装了pip.
我已成功地从pip安装新软件包,现在我需要将自定义存储库URL添加到pip的安装列表中

为此,我需要根据官方手册修改pip.ini哪个文件夹 但是没有任何文件夹(不在,不在,不在),也没有文件夹在:%APPDATA%\pip\pip.ini
pipRoamingLocalLocalLowPyPaC:\ProgramData\PyPA\pip\pip.conf

你能告诉我在哪里搜索pip.ini吗?如何将外国仓库添加到安装列表?

windows configuration pip python-2.7

26
推荐指数
6
解决办法
4万
查看次数

在 dockerfile 中自定义 ONBUILD 环境

我稍微修改了这个 Dockerfile以支持我的特定用例:我需要指定我自己的PyPi服务器,我们将在其中发布我们的内部库。这通常可以通过指定pip.conf文件或将命令行选项传递给pip.

我正在尝试这样做:

FROM python:3.5

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

ONBUILD COPY requirements.txt /usr/src/app/

# 1st try: set the env variable and use it implicitely. Does not work!
# ENV PIP_CONFIG_FILE pip.conf
# ONBUILD RUN pip install --no-cache-dir -r requirements.txt

# 2nd try: set once the env variable, just for this command. Does not work!
# ONBUILD RUN PIP_CONFIG_FILE=pip.conf pip install --no-cache-dir -r requirements.txt

# 3rd try: directly configure pip. Works, …
Run Code Online (Sandbox Code Playgroud)

python docker dockerfile

3
推荐指数
2
解决办法
6221
查看次数

标签 统计

configuration ×1

docker ×1

dockerfile ×1

pip ×1

python ×1

python-2.7 ×1

windows ×1