I'm running into a problem when trying to resolvin...
# ask-metaflow
f
I'm running into a problem when trying to resolving named environments with packages from a private pypi repository (AWS codeartifact). I want to use pip environment variables to pass the extra-index-url, e.g. through PIP_EXTRA_INDEX_URL. My understanding from other posts here is that what I'm trying to do should work. I've tried
Copy code
PIP_EXTRA_INDEX_URL=<url_with_temporary_token> metaflow environment resolve -r requirements.txt --alias test_env
which fails already in the first step of resolving the environment. It just doesn't have access to the private repo and fails to resolve any private packages.
Copy code
ERROR: Could not find a version that satisfies the requirement <private-package>==0.1 (from versions: none)
ERROR: No matching distribution found for <private-package>==0.1
Strangely, when creating a pip.conf that contains the extra-index-url it almost works. When running
Copy code
PIP_CONFIG_FILE=pip.conf metaflow environment resolve -r requirements.txt --alias test_env
Metaflow is able to resolve the environment including the private packages and their dependencies, but in the step where it downloads the packages from the web, I get a
401 Client Error: Unauthorized for url:
for the private repo. It looks like when trying to download from the web it doesn't use the pip.conf anymore but instead tries to directly access the url prepared earlier in the process (without the token) and hence fails. I see that there is some auth handling here but this doesn't seem to do the thing that's necessary for my use case. I'm using metaflow==2.15.21 and metaflow-netflixext==1.2.3.
d
Hey — sorry about that. Could you run with METAFLOW_DEBUG_CONDA=1 as env var. that might help me with what is going on.