Hi Folks! I’m getting alot of errors running pex t...
# general
a
Hi Folks! I’m getting alot of errors running pex targets … pants is complaining about not being able to find matching distributions. For example :
ERROR: No matching distribution found for SQLAlchemy==1.3.22
Any ideas?
👋 2
h
Hi Mark, welcome! Hm do you have run's output? I want to make sure this is an error when building the
pex_binary
you're trying to run via
./pants run
, rather than a runtime error after the PEX has been built
a
Hey Eric! Thanks for your response. Will post output here: `150120.09 [WARN] Please either set
enabled = true
in the [anonymous-telemetry] section of pants.toml to enable sending anonymous stats to the Pants project to aid development, or set
enabled = false
to disable it. No telemetry sent for this run. An explicit setting will get rid of this message. See https://www.pantsbuild.org/v2.6/docs/anonymous-telemetry for details.`
15:01:58.85 [INFO] Completed: Building requirements.pex with 7 requirements: Flask-Babel==2.0.0, Flask-Caching==1.9.0, Flask-Cors==3.0.10, SQLAlchemy==1.3.22, flask==1.1.2, flask_httpauth==4.4.0, pandas==1.3.1
15:01:58.85 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError)
File "/Users/mark/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.OWhIh3/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 234, in _run_inner
return self._perform_run(goals)
File "/Users/mark/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.OWhIh3/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 173, in _perform_run
return self._perform_run_body(goals, poll=False)
File "/Users/mark/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.OWhIh3/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 190, in _perform_run_body
return self.graph_session.run_goal_rules(
File "/Users/mark/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.OWhIh3/install/lib/python3.9/site-packages/pants/init/engine_initializer.py", line 135, in run_goal_rules
exit_code = self.scheduler_session.run_goal_rule(
File "/Users/mark/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.OWhIh3/install/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 533, in run_goal_rule
self._raise_on_error([t for _, t in throws])
File "/Users/mark/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.OWhIh3/install/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 501, in _raise_on_error
raise ExecutionError(
Exception message: 1 Exception encountered:
ProcessExecutionFailure: Process 'Building requirements.pex with 7 requirements: Flask-Babel==2.0.0, Flask-Caching==1.9.0, Flask-Cors==3.0.10, SQLAlchemy==1.3.22, flask==1.1.2, flask_httpauth==4.4.0, pandas==1.3.1' failed with exit code 1.
stdout:
stderr:
WARNING: Url 'file:////Users/mark/consulting/mesh/mesh-dash/local_packages' is ignored: it is neither a file nor a directory.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/flask-babel/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/flask-babel/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/flask-babel/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/flask-babel/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/flask-babel/
WARNING: Url 'file:////Users/mark/consulting/mesh/mesh-dash/local_packages' is ignored: it is neither a file nor a directory.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/flask-caching/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/flask-caching/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/flask-caching/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/flask-caching/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/flask-caching/
WARNING: Url 'file:////Users/mark/consulting/mesh/mesh-dash/local_packages' is ignored: it is neither a file nor a directory.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/flask-cors/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/flask-cors/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/flask-cors/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/flask-cors/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/flask-cors/
WARNING: Url 'file:////Users/mark/consulting/mesh/mesh-dash/local_packages' is ignored: it is neither a file nor a directory.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/sqlalchemy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/sqlalchemy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/sqlalchemy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/sqlalchemy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /Docs/packages/sqlalchemy/
ERROR: Could not find a version that satisfies the requirement SQLAlchemy==1.3.22
ERROR: No matching distribution found for SQLAlchemy==1.3.22
pid 89259 -> /Users/mark/.cache/pants/named_caches/pex_root/venvs/7862918fbb6656dd8d7eff1dd55ba13dcb07002e/10eae7756e90777b5879f0657f8627ae8200b7ae/pex --disable-pip-version-check --no-python-version-warning --exists-action a --isolated -q --cache-dir /Users/mark/.cache/pants/named_caches/pex_root --log /private/var/folders/2b/f1t6ly0x2273t0h7gygxmrv00000gn/T/process-executionJjLbct/.tmp/tmpi_ei_4cy/pip.log download --dest /private/var/folders/2b/f1t6ly0x2273t0h7gygxmrv00000gn/T/process-executionJjLbct/.tmp/tmp948tp9i4/usr.local.Caskroom.miniconda.base.envs.mesh.bin.python3.8 --constraint constraints.txt Flask-Babel==2.0.0 Flask-Caching==1.9.0 Flask-Cors==3.0.10 SQLAlchemy==1.3.22 flask==1.1.2 flask_httpauth==4.4.0 pandas==1.3.1 --index-url <https://pypi.org/simple/> --extra-index-url <https://dash.meshdiversity.com/Docs/packages> --find-links file:////Users/mark/consulting/mesh/mesh-dash/local_packages --retries 5 --timeout 15 exited with 1 and STDERR:
None
h
Hm those warnings seem relevant given that they're complaining about SQLAlchemy, and I notice you're using
[python-repos]
options. Do you know if you're expecting ro resolve SQLAlchemy from PyPI or from your own index?
a
yeah should be from pypi … no longer using additional repos, have removed
🤞 1
no dice, same complaint
i’m not requesting any specific dist of sqlalchemy
so strange its looking for something other than what pip installed
moving this app from make based build to pants but this seems to be a blocker 😕
h
What Pants version is this? Wondering because the Pip resolver changes depending on that
a
2.6.1rc3
maybe i’ll drop back to 2.6 and respin
same result 😢
h
Okay cool, then you're using the new pip resolver. I don't suspect 2.6.1rc3 vs 2.6.0 would make a difference, indeed
a
ok, will bump back to the RC
h
Do others hit this issue at your org? One idea I had is if the constraints.txt version != the top level requirement you have of
SQLAlchemy==1.3.22
. But I think pip's new resolver would have a better error message in that case..Still, maybe worth double checking. On that note, you could temporarily disable
[python-setup].requirement_constraints
a
i’m blazing new ground here with this app 😉 - in general though pants (and sqlalchemy) are in use across the eng team with no similar issues reported
this strange distribution not found issue doesnt seem to be specific to sqlalchemy … saw it earlier today with scipy and pandas
was able to resolve by reinstalling the package with pip
is there a way to ask pants to print out what dist it thinks it needs? could then compare against what pip installs
meanwhile i’ll explore the hints in your last message (thanks!)
h
Yeah,
./pants dependencies --type=3rdparty --transitive path/to:pex_binary
🙌 1
a
ok so your hint above did it - had a requirements.txt with sqlalchemy==1.3.22 where constraints.txt was 1.3.23 🤦
many thanks for helping debug this @hundreds-father-404 - even though it had nothing to do with pants!
h
Yay!! I'm annoyed with the pip error, I thought it would have been more informative Fwit, we've been actively working on reinvisioning lockfile support. https://github.com/pantsbuild/pants/issues/12314. Pants will generate the lockfiles for you and warn/error when they need to be updated again. No need to manually regenerate
constraints.txt
. See PR description at https://github.com/pantsbuild/pants/pull/12734 for an explanation of the UX
👀 1
e
@acceptable-tent-43498 it may help going forward to realize Pants in general is hermetically sealed. In particular, in its Python support, pip installing should have no effect on Pants. It actively tries to isolate the processes it runs from your local environment for a host of reasons, but including reproducibility of builds.
1
Pex is also not happy with the error message in this case: https://github.com/pantsbuild/pex/issues/1200
🚀 1
a
@enough-analyst-54434 ok good to know, thanks thanks