https://pantsbuild.org/ logo
#general
Title
# general
b

bitter-ability-32190

09/06/2022, 5:52 PM
Weird PEX issue involving
awscli
(happens in any
layout
mode). Pex attached...
Copy code
$ python3.8 aws.pex 
Traceback (most recent call last):
  File "/home/joshuacannon/.pex/venvs/55691004f59e3a2b4d0b5c07b229db01742aa7db/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/bin/aws", line 21, in <module>
    import awscli.clidriver
ModuleNotFoundError: No module named 'awscli'
Note, if I
./pants run path/to/deps:aws
I can run the PEX, but
./pants package
has this affliction
Looks like
venv
mode is what kills this
e

enough-analyst-54434

09/06/2022, 6:27 PM
Does
PEX_TOOLS=1 aws.pex venv right/here && right/here/pex
work? If so, I can Point to a Pants issue - there is a Pex flag it does not expose.
I'm trying the not-lazy version of the question presently...
Well, worked for me?:
Copy code
jsirois@Gill-Windows:~$ /mnt/c/Users/John\ Sirois/Downloads/aws.pex
Note: AWS CLI version 2, the latest major version of the AWS CLI, is now stable and recommended for general use. For more information, see the AWS CLI version 2 installation instructions at: <https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html>

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: the following arguments are required: command
Yeah - even going full detailed apples-apples:
Copy code
jsirois@Gill-Windows:~$ cp /mnt/c/Users/John\ Sirois/Downloads/aws.pex .
jsirois@Gill-Windows:~$ rm -rf ~/.pex/
jsirois@Gill-Windows:~$ python3.8 aws.pex
Note: AWS CLI version 2, the latest major version of the AWS CLI, is now stable and recommended for general use. For more information, see the AWS CLI version 2 installation instructions at: <https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html>

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: the following arguments are required: command
b

bitter-ability-32190

09/06/2022, 6:31 PM
How likely is a corrupted pex venv?
e

enough-analyst-54434

09/06/2022, 6:31 PM
Very unlikely.
b

bitter-ability-32190

09/06/2022, 6:31 PM
Yup blasting the
venv
in my pex root did the trick. 😞
I should've
mv
😞
e

enough-analyst-54434

09/06/2022, 6:31 PM
Yes.
4 Views