nccgroup / aws-inventory

Discover resources created in an AWS account.
Apache License 2.0
704 stars 131 forks source link

Does the tool run with python3? #37

Open tsvivayl opened 2 years ago

tsvivayl commented 2 years ago

Python2 is deprecated. Trying to run the tool with python3 but getting syntax errors i.e

ubuntu@ip-172-31-40-7:~/nccgroup/aws-inventory$ python3 aws_inventory.py File "/home/ubuntu/nccgroup/aws-inventory/aws_inventory.py", line 246 print aws_inventory.version ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

It seems that the python script cannot be executed on python3 after the syntax changes that have been introduced there.

I am using an Ubuntu 20.04 VM. By default, the available python (and pip coming with python) is version 3.x. Even if I manage to install python2.7, pip installs the requirements with the new python3.x versions so I cannot run the script with python2.7. It says that the modules in the requirements are not found when actually the requirements are installed. example:

ubuntu@ip-172-31-40-7:~/nccgroup/aws-inventory$ python2 aws_inventory.py Traceback (most recent call last): File "aws_inventory.py", line 6, in import botocore ImportError: No module named botocore

ubuntu@ip-172-31-40-7:~/nccgroup/aws-inventory$ pip install -r requirements.txt Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: botocore in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 1)) (1.25.13) ...

I also tried running the tool on an amzn2-linux machine where the environment is python2.7 and I managed the get it running. However, the tool freezes the VM completely at the beginning of the execution. It breaks the GUI and the VM becomes unresponsive. After reading the comments, I understand that this tool is running only on Ubuntu Desktop (GUI) environment with only python2.7. Am I correct? Thanks

lohman commented 1 year ago

Same. I wonder if this script is dead.