I commented on a closed issue about a problem with...
# general
b
I commented on a closed issue about a problem with trying to use tensorflow that doesn’t work. https://github.com/pantsbuild/pants/issues/16055#issuecomment-1210154370
e
The suggestion there still works. You may not have known about the special `%(buildroot)s`substitution avaiable in `pants.toml`config files. I specialized the recommendation on the ticket to exactly what you're trying to do.
b
Thank you. Also, just a minor detail, is
pip wheel
in 1.) correct
pip download
?
e
pip wheel
is correct. The distribution might be available as sdist-only (for example: https://pypi.org/project/cowsay/5.0/#files) in which case you want Pip to turn it into a wheel for you.
b
I get the following error when I run it, is this a problem with the environment?
Copy code
$ pip wheel --dest find-links-repo termcolor==1.1

Usage:   
  pip wheel [options] <requirement specifier> ...
  pip wheel [options] -r <requirements file> ...
  pip wheel [options] [-e] <vcs project url> ...
  pip wheel [options] [-e] <local project path> ...
  pip wheel [options] <archive url/path> ...

no such option: --dest
e
My apologies, but also,
--help
is your friend. It's
--wheel-dir
not
--dest-dir
.
đź‘Ť 1
b
Sorry, I haven’t used wheel much and wasn’t sure. Thanks for the detailed explanation. I will try the method you suggested.
Thank you. I tried the method you suggested and it worked. Very helpful!
One problem occurred. I ran “.pant generate-lockfiles” in my local environment, generated lockfile, committed the generated file to Github, and built it with CI and it failed! “. /pants generate-lockfiles” will create a lockfile as follows, and the lockfile will contain the absolute path of the environment in which generate-lockfiles was run. Is there any workaround or solution to this?
Copy code
{
          "artifacts": [
            {
              "algorithm": "sha256",
              "hash": "2c4b2fc5aece485b791405c8f96c67c35c25ed503f248ec68d0df2c4964267ec",
              "url": "file:///path/to/rootdir/thirdparty/python/wheels/termcolor-1.1.0-py3-none-any.whl"
            },
            {
              "algorithm": "sha256",
              "hash": "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b",
              "url": "<https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz>"
            }
          ],
          "project_name": "termcolor",
          "requires_dists": [],
          "requires_python": null,
          "version": "1.1"
        },
@enough-analyst-54434 Thanks for your help!