0

I need to set conda to use pypi local antifactory in our organization to install packages.

Is that possible? so that when I run conda install package_name it pulls it from our local pypi server.

Please note that for pip, I have changed pip config as below and it is pulling from local pypi

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

What I have tried: I created a yaml file in the project

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

And then run conda env create -f conda_env.yaml

It still does not create the environment for me and this the error:

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."))'))

Amin Ba
  • 704
  • 4
  • 18

1 Answers1

1

This question seems to be duplicate of:

Can conda be configured to use a private pypi repo?

In brief: ״Conda won't search PyPI or alternative pip-compatible indexes automatically, but one can still use the --index-url or --extra-index-url flags when using pip install״

Tom.A
  • 127
  • 2
  • 8
  • Please check the edited question – Amin Ba Feb 14 '22 at 20:22
  • Could be a configuration issue. Can you please attach Artifactory logs if exist and verify configuration according to: https://stackoverflow.com/questions/42563757/conda-update-condahttperror-http-none – Tom.A Feb 14 '22 at 20:47
  • I dont have logs. I am in a big organization I do not have access. I did that config. It did not work – Amin Ba Feb 14 '22 at 20:52
  • Actuallly, I want it not to go to anaconda.com and only go to internal pypi – Amin Ba Feb 14 '22 at 20:53
  • How to do that? – Amin Ba Feb 14 '22 at 20:53
  • @AminBa Is the installation being attempted from a windows environment? If yes, I think the installation is running into the same issue reported here (https://github.com/conda/conda/issues/8046). Consider installing SSL module in the VM from where you are attempting the installation which should help with resolving this issue. – Yuvarajan Feb 15 '22 at 05:27
  • Ye it is in windows environment. – Amin Ba Feb 15 '22 at 11:12