Feb-21-2023, 08:06 PM
My work computer runs windows and I do not have admin rights. The computer however does allow install of Python using the company's package manager. The package manager installs python into c:\program files and updates the path. It also installs PIP into c:\program files.
If I update PIP using pip install --upgrade pip, the new version of pip is installed into my local appdata directory. According to documentation, this appears to be normal because on windows, pip installs packages to the appdata by default. I did however I did notice that I had to update the path variable to favor the appdata directory first or the older global verison of pip gets run instead.
When I create a new virtual environment using python -m venv <myproject>\.venv, the older version of pip in program files is copied over to the virtual environment instead of the newer version in appdata. This is despite that the older PIP is later in the path. Is this some sort of bug or is there a way around this?
My current workaround is to run pip again in the virtual environment, which seems to install the pip into the virtual environment.
If I update PIP using pip install --upgrade pip, the new version of pip is installed into my local appdata directory. According to documentation, this appears to be normal because on windows, pip installs packages to the appdata by default. I did however I did notice that I had to update the path variable to favor the appdata directory first or the older global verison of pip gets run instead.
When I create a new virtual environment using python -m venv <myproject>\.venv, the older version of pip in program files is copied over to the virtual environment instead of the newer version in appdata. This is despite that the older PIP is later in the path. Is this some sort of bug or is there a way around this?
My current workaround is to run pip again in the virtual environment, which seems to install the pip into the virtual environment.