Hello again. I faced confusing error: Could not fi...
# general
o
Hello again. I faced confusing error: Could not find script 'black' in any distribution within PEX! Context: 1. I executed
pants generate-lockfiles
to create my resolve, command worked fine. 2. Then I executed
pants tailor --check update-build-files --check ::
, this command raised an error
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='<http://files.pythonhosted.org|files.pythonhosted.org>', port=443): Read timed out.
. My requirements.txt contains torch package, so I think the error happened due to the huge size of the package. My first question is about this problem: Is there any way to change default pip install timeout? 3. After that I removed torch package from the requirements file and executed
pants generate-lockfiles
for the second time. Pants told me that dependency "torch" was removed. 4. Finnaly I executed
pants tailor --check update-build-files --check ::
once again. As a result I faced an error:
Copy code
[ERROR] 1 Exception encountered:

Engine traceback:
  in Update all BUILD files

ProcessExecutionFailure: Process 'Building black.pex' failed with exit code 1.
stdout:

stderr:
Could not find script 'black' in any distribution pip 24.0 within PEX!
s
you've created the resolve, but you didn't install black in it
add in your
BUILD
Copy code
python_requirement(name='black', requirements=["black"], resolve="your-black-resolve")
o
Thanks, it fixes the major problem, but still the following error occurs during
pants generate-lockfiles
execution:
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='<http://files.pythonhosted.org|files.pythonhosted.org>', port=443): Read timed out.
. I think it happens due to some troubles with my network, so maybe there is a way to define
--default-timeout
argument for
pip install
command?