AppInventor On Linux

Im trying to run appinventor offline on linux.
I had installed all of the things required and atlast i ran java dev app server command.

kumaraswamy@kumaraswamy7:~$ sudo su
[sudo] password for kumaraswamy: 
root@kumaraswamy7:/home/kumaraswamy# /home/kumaraswamy/google-cloud-sdk-318.0.0-linux-x86_64/google-cloud-sdk/bin/java_dev_appserver.sh --address=0.0.0.0 --port=8888 appengine/build/war/
Traceback (most recent call last):
  File "/home/kumaraswamy/google-cloud-sdk-318.0.0-linux-x86_64/google-cloud-sdk/bin/bootstrapping/java_dev_appserver.py", line 10, in <module>
    import bootstrapping
  File "/home/kumaraswamy/google-cloud-sdk-318.0.0-linux-x86_64/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 46, in <module>
    from googlecloudsdk.core.updater import update_manager
  File "/home/kumaraswamy/google-cloud-sdk-318.0.0-linux-x86_64/google-cloud-sdk/lib/googlecloudsdk/core/updater/update_manager.py", line 39, in <module>
    from googlecloudsdk.core.console import progress_tracker
  File "/home/kumaraswamy/google-cloud-sdk-318.0.0-linux-x86_64/google-cloud-sdk/lib/googlecloudsdk/core/console/progress_tracker.py", line 631, in <module>
    class _BaseStagedProgressTracker(collections.Mapping):
AttributeError: module 'collections' has no attribute 'Mapping'

But unfortunately it dosent work, i thought it was a issue of python version i upgraded it from (3.1 -> 3.9). But still that dosent fix the error.

Try setting

export CLOUDSDK_PYTHON=path/to/python3.7

replace path/to/python3.7 with your path to python3.7 (Typically /bin/python3) you can find it by where python3

Hi thanks, that dosent work, i had alredy set the cloud sdk python path before.

I installed python by terminal, so i dont know where its located, by default there was py3.1, i downloaded the py3.9, i assume the script is still using the older version.

Can you try running, sudo apt remove python maybe its using python2

1 Like

Yes i did that. As expected the other version still exists. (3.9)

Try running it now

No, problem still persists.

Did you run:

./buildtools doctor

Your install needs to pass all the tests....

and check you are not already running something on port 8888

Yep, that had told me to install java dev server, i have did it and all are checked.

If you just type python in a terminal what do you get back ?
(use CTRL+D to exit back to prompt when done)

I have version 2.7.18 and for GCC 9.4.0

Could be your python version is too high ?

image

This is what happens. I have to explicitly mention the version while typing it.

Yes, you have to type python3 for python 3.x. This shows you have no python 2 on board. I am not sure if this is an issue, just that I know that python 2 has worked for me in the past.

1 Like

Thanks

I this time managed to get it work.
The problem earlier, probably was not because of the Python Version.

2 Likes