14

i am trying to run tox commands but it shows error

ValueError: Unable to find resource t64.exe in package pip._vendor.distlib

ERROR: python3.7: could not install deps [-rrequirements.txt]; 
v = InvocationError("'C:\\path\\test_tox\\.tox\\python3.7\\Scripts
\\python.EXE' -m pip install -rrequirements.txt", 2)

have tried most of the solution available in internet, but nothing seems to be working. i am not sure what is the root cause of this

requirements.txt:

dvc
dvc[gdrive]
sklearn
pandas
pytest
tox

enter image description here

not2qubit
  • 14,531
  • 8
  • 95
  • 135
Somal Kant
  • 191
  • 1
  • 2
  • 4

3 Answers3

54

Uninstall SetupTools:

python -m pip uninstall pip setuptools

Upgrade PIP:

pip3 install --upgrade pip

Reinstall Setuptools:

pip install --upgrade setuptools
ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
Techno Appear
  • 549
  • 3
  • 3
  • 3
    Very strange. Here on Win-10 with `Py-3.10.0`, I had to open a an admin pwsh, and run `python -m pip uninstall pip` and then suddenly there was already an instance of the new/latest pip version.There was another version in `c:\users\xxx\appdata\roaming\python\python310\scripts\pip.exe` that took precedence over the *admin* one in: `C:\Python310\lib\site-packages\pip`. – not2qubit Nov 04 '22 at 17:55
  • 1
    @not2qubit this solved it for me, I ran python -m pip uninstall pip and after that I was able to run the normal python -m pip install --upgrade pip – Karl May 15 '23 at 10:27
2

Answer provided by @techno-appear worked, however I had to do

py -m pip install --upgrade pip

And if that doesn't work, Pip itself advices (through a warning message) to do:

python.exe -m pip install --upgrade pip
Cfuen
  • 21
  • 2
0

Below command works for me, thanks to Colonel Panic:

python -m pip uninstall pip setuptools
python -m ensurepip
python -m pip install --upgrade pip
sailfish009
  • 2,561
  • 1
  • 24
  • 31