Hi, I have one lockfile 3rdparty/python/default.lo...
# general
f
Hi, I have one lockfile 3rdparty/python/default.lock that states
Copy code
//   "valid_for_interpreter_constraints": [
//     "CPython>=3.10"
//   ],
When running
pants export --resolve=python-default
each team member gets a different python version exported to
dist/export/python/virtualenvs/python-default
. How can I pin the Python version used for local development for an export?
1
s
You need this in
pants.toml
Copy code
[python]
interpreter_constraints = ["CPython==3.11.*"]
f
That is no option for me unfortunately. I'm using 3.10, 3.11 and 3.12 in
interpreter_constraints
of
pex_binary
. It's a normal thing for me to have a lockfile with open interpreter dependencies. Still for the local development venv I want to specify which version to pick.
s
Then I don't know, maybe someone with more experience with pants have an answer
s
If you use different python versions anyway, then why you care about python version in venv?
f
Performance. 3.11 is significantly faster.
s
ok, you can try using
.pants.rc
locally then
Copy code
[python]
interpreter_constraints = ["CPython==3.11.*"]
f
Thanks this seems to do the trick!
👍 1