Closed jieru-hu closed 2 weeks ago
I don't really think this is a Nox issue. Looking at the output, the error didn't came from a Nox operation, so I assume it came from somewhere else. Does a pip install fails on a Python 3.10 virtual environment [^1]?
[^1]: Just to be clear, try a package that is not installed (using pip itself is not bad, but you'll might get a Requirement already satisfied
message instead of a real installation process). Also, I see that Nox made your virtual environments using virtualenv, so you might have to use this tool, just to reproduce the situation as far as possible :)
hi @DiddiLeija thanks for the suggestion. pip also succeeds in virtualenv
as well which is why i suspect this might be nox related.
(hydra) PS C:\Users\circleci> python -m venv venv
python -m venv venv
(hydra) PS C:\Users\circleci> which python
/c/tools/miniconda3/envs/hydra/python
(hydra) PS C:\Users\circleci> python --version
python --version
Python 3.10.4
(hydra) PS C:\Users\circleci> venv\Scripts\Activate.ps1
venv\Scripts\Activate.ps1
(venv) (hydra) PS C:\Users\circleci> which python
which python
/c/Users/circleci/venv/Scripts/python
(venv) (hydra) PS C:\Users\circleci> python -m pip install --upgrade pip
python -m pip install --upgrade pip
Requirement already satisfied: pip in c:\users\circleci\venv\lib\site-packages (22.0.4)
Collecting pip
Using cached pip-22.1-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 22.0.4
Uninstalling pip-22.0.4:
Successfully uninstalled pip-22.0.4
Successfully installed pip-22.1
Well, that's weird. This is what I suppose: the issue comes from a somehow broken venv, the question is where.
Your Python is managed via conda
(miniconda, actually), but you create the venv via python -m virtualenv
. Just to discard a possibility, can you set up Nox to create the venv with conda?
thanks @DiddiLeija for the suggestion! I will give it a try. TIL could use conda as the backend :P
@jieru-hu this looks like some conda weirdness to me, IIRC conda does a lot of complex stuff with compiled stuff and linked libraries in the environment such that it "just works" which it does almost all the time in fairness, just means when it does go wrong it happens in a weird way. I've had trouble in the past mixing conda and virtualenv in the same environment.
I'd suggest using conda as the venv backend and report back. Unfortunately I don't have a windows machine to debug on so you actually may be better placed than me to experiment!
Yeah, I also think this came from mixing conda and virtualenv. So that's why we have venv_backend
, more info here.
Hi @jieru-hu! It's been a while since my last comment here, so did you manage to fix your issue? Please let us know :upside_down_face:
Current Behavior
I can run pip on the same machine with no issue outside of nox
on the same machines, other python versions works as expected.
Expected Behavior
nox should work on py 3.10 + windows.
Steps To Reproduce
here is an example failures job we have on our CI. https://app.circleci.com/pipelines/github/facebookresearch/hydra/14406/workflows/26c69463-cd46-40ad-a8f1-771e0bfd33a9/jobs/140853
You should be able to repro it by submitting a PR in our repo.
Environment
Anything else?
any pointer would be awesome... thanks for your amazing work!!