future-dream-25165
09/20/2023, 2:47 PMdist/export/python/virtualenvs/python-default/...
but Pylint
is telling me that it can't find the 'member' for Module 'A'
when doing import A
and calling A.func()
. Similarly doing from A import X, Y
also errors saying no name 'X' in module 'A'. It seems to know about A
but not what's inside?
not sure if this is pants related or VS Code specific but either way I'm find it hard to find any infofamous-kilobyte-26155
09/25/2023, 3:37 PMfuture-dream-25165
10/10/2023, 6:42 PMbumpy-fireman-59234
10/17/2023, 8:38 PMfamous-kilobyte-26155
10/17/2023, 8:39 PMbumpy-fireman-59234
10/17/2023, 8:41 PMfamous-kilobyte-26155
10/17/2023, 8:53 PMbumpy-fireman-59234
10/17/2023, 9:06 PMbumpy-fireman-59234
10/17/2023, 9:07 PMpants export --py-resolve-format=symlinked_immutable_virtualenv --resolve=reqs
famous-kilobyte-26155
10/17/2023, 9:10 PMresolves = { python-default = "python-default.lock"}
famous-kilobyte-26155
10/17/2023, 9:10 PM--resolve=python-default
bumpy-fireman-59234
10/17/2023, 9:11 PMfamous-kilobyte-26155
10/17/2023, 9:12 PMbumpy-fireman-59234
10/17/2023, 9:12 PM[python]
interpreter_constraints = [">=3.10,<=3.12"]
enable_resolves = true
default_resolve = "reqs"
famous-kilobyte-26155
10/17/2023, 9:13 PMfamous-kilobyte-26155
10/17/2023, 9:13 PMfamous-kilobyte-26155
10/17/2023, 9:15 PMbumpy-fireman-59234
10/17/2023, 9:17 PMfamous-kilobyte-26155
10/17/2023, 9:24 PMpants export
and then ln -snf
linking venv to the virtual environment directory for the resolve. it seems the links under venv do changebumpy-fireman-59234
10/17/2023, 9:43 PMfamous-kilobyte-26155
10/17/2023, 9:46 PM#!/bin/sh
REPO_DIR=/workspaces/flywheel-gear-extensions
ROOTS=$(pants roots)
python3 -c "print('PYTHONPATH=\"./' + ':./'.join('''${ROOTS}'''.split('\n')) + ':\$PYTHONPATH\"')" > .env
if [ ! -e python-default.lock ]; then
pants generate-lockfiles
else
echo "Skipping generation of lock file"
fi
pants export --py-resolve-format=symlinked_immutable_virtualenv --resolve=python-default
ln -snf dist/export/python/virtualenvs/python-default $REPO_DIR/venv
famous-kilobyte-26155
10/17/2023, 9:46 PMbumpy-fireman-59234
10/17/2023, 11:43 PMdist/export/python/virtualenvs/reqs/3.11.3
. Looks like I have a python version tagged on. Do you have the same thing?famous-kilobyte-26155
10/18/2023, 2:50 AMbumpy-fireman-59234
10/18/2023, 8:12 PM~/.cache/pants/named_caches/pex_root/venvs/229ed584e43343414b852a697540d96f1016b78f/aad4b57db4397cb1d79fcc114dd2cd89a3311113/bin/python3.11
. Not really sure why.future-dream-25165
10/18/2023, 8:17 PMsettings.json
for a specific project in the Workspace?bumpy-fireman-59234
10/18/2023, 9:01 PMbumpy-fireman-59234
10/18/2023, 9:02 PMfamous-kilobyte-26155
10/18/2023, 10:36 PMfuture-dream-25165
10/19/2023, 1:45 PMbumpy-fireman-59234
10/19/2023, 4:08 PMbumpy-fireman-59234
10/19/2023, 4:09 PMbumpy-fireman-59234
10/19/2023, 4:09 PMfuture-dream-25165
10/19/2023, 4:14 PMfuture-dream-25165
10/19/2023, 4:45 PMYes, I just look at the symlink created in dist/export/python/how exactly do you check the symlink? I can't see how to link it to the cache, I have multiple folders inside
~/.cache/pants/named_caches/pex_root/venvs/
bumpy-fireman-59234
10/19/2023, 5:03 PMls -l dist/export/python/virtualenvs/python-default/3.x.x/
and see what it points to. In my case, I see this:
$ ls -l dist/export/python/virtualenvs/reqs/3.11.6
lrwxr-xr-x@ 1 joe staff 133B Oct 18 22:23 dist/export/python/virtualenvs/reqs/3.11.6@ -> /Users/joe/.cache/pants/named_caches/pex_root/venvs/7ea401a8a5c94fa5f10b264a4e04c88708efabb6/aad4b57db4397cb1d79fcc114dd2cd89a3311113