asdf-community / asdf-python

Python plugin for the asdf version manager
https://github.com/asdf-vm/asdf
MIT License
655 stars 56 forks source link

SyntaxError when executing `python -c` #8

Closed y9v closed 7 years ago

y9v commented 7 years ago

Hello!

I have a weird problem here (not sure it's asdf-python issue though):

$ /usr/bin/python --version
$ ~/.asdf/shims/python --version

$ /usr/bin/python -c 'import sys; print("python")'
python

$ ~/.asdf/shims/python -c 'import sys; print("python")'
  File "<string>", line 1
    import
         ^
SyntaxError: invalid syntax

I would simply ignore this, but anaconda-mode in spacemacs is using -c to evaluate code, and throws an error every time I type something in a python file in spacemacs.

danhper commented 7 years ago

Hi, I will take a look at it, thanks for reporting!

danhper commented 7 years ago

This should now be fixed, could you try to run

asdf plugin-update python

and give it another try?

y9v commented 7 years ago

@tuvistavie thanks! will give it a try now.

y9v commented 7 years ago

@tuvistavie thank you, it's working after reinstalling python through asdf