Hi folks, I'm having a problem with an exported vi...
# general
f
Hi folks, I'm having a problem with an exported virtual env and I was wondering if anyone had seen anything like this before. I have a requirements file that contains:
Copy code
vtk==9.3.0
I then run
Copy code
pants export --resolve=python-default
In the exported venv
import vtk
fails with
Copy code
ImportError: Initialization failed for vtkWebCore, not compatible with vtkmodules.vtkCommonCore
But if I
pip uninstall vtk
then
pip install vtk==9.3.0
then
import vtk
works fine. So it seems that pants isn't installing vtk into the exported venv correctly. Is there anything I could try to debug this further? Thanks!
c
It works for me on a new repo with Pants 2.19.0 and got for
[python].interpreter_constraints = ["==3.9.*"]
. Maybe try playing with those? If you're using lockfiles, you can double-check that the requirements and platform information looks right. You might also want to double-check that no other requirements have an extra, like
vtk[web]
f
Thanks a lot Daniel! I'll update Pants, try to reproduce that and see what's different