How can I run a command using python2 as the interpreter if I have Anaconda 3?

43 views Asked by At

Im trying tto emulate an android device on my linux computer. I decided to go with androidviewclient and Culebra.

However, I think both are designed for python2, because when I run

culebra --version

I get the error:

File "/home/user/anaconda3/envs/mobile/bin/culebra", line 155 print progname, version ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(progname, version)?

I installed it using pip within and Anaconda 3 environment. I have installed python2.7 but when I run python it still uses python3. I can however run python2 using /usr/bin/python2.7.

When I run culebra, I guess it still runs it using python3, hence the error with the brackets. How can I run the culebra command using python2?

1

There are 1 answers

0
Diego Torres Milano On

To install or upgrade the python3 compatible version (which is a pre-release) you can run

$ pip3 install --pre androidviewclient --upgrade

and it will install 20.x.y.