【问题标题】:How to set conda to use local pypi server? [duplicate]如何设置 conda 使用本地 pypi 服务器? [复制]
【发布时间】:2022-02-15 04:35:41
【问题描述】:

我需要在我们的组织中设置 conda 使用 pypi local antifactory 来安装包。

这可能吗?这样当我运行 conda install package_name 时,它会从我们的本地 pypi 服务器中提取它。

请注意,对于 pip,我已将 pip 配置更改为如下,它是从本地 pypi 中提取的

[global]
index-url = https://artifactory-qa.my_organization.net/artifactory/api/pypi/pypi-virtual/simple

我尝试过的: 我在项目中创建了一个yaml文件

name: conda_env
channels:
  - defaults
dependencies:
  - python
  - pip
  - pip
    - --extra-index-url https://artifactory-qa.my_company.net/artifactory/api/pypi/pypi-virtual/simple
    - pytest

然后运行conda env create -f conda_env.yaml

它仍然没有为我创造环境,这是错误:

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'conda.anaconda.org\', port=443): Max retries exceeded with url: /conda-forge/win-64/repodata.json (Caused by SSLError("Can\'t connect to
 HTTPS URL because the SSL module is not available."))'))

【问题讨论】:

    标签: python pip conda artifactory jfrog


    【解决方案1】:

    这个问题似乎是重复的:

    Can conda be configured to use a private pypi repo?

    简而言之:Conda 不会自动搜索 PyPI 或替代 pip 兼容索引,但在使用 pip install 时仍然可以使用 --index-url 或 --extra-index-url 标志

    【讨论】:

    • 请检查已编辑的问题
    • 可能是配置问题。如果存在,您能否附上 Artifactory 日志并根据:stackoverflow.com/questions/42563757/… 验证配置
    • 我没有日志。我在一个大组织中,我无权访问。我做了那个配置。它没有工作
    • 其实,我希望它不去 anaconda.com,只去内部 pypi
    • 怎么做?
    猜你喜欢
    • 2013-01-18
    • 1970-01-01
    • 2010-09-15
    • 2016-04-15
    • 1970-01-01
    • 2013-10-05
    • 2020-04-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多