Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete-python v1.17/0 not working #450

Open
hallymer opened this issue Jan 26, 2021 · 16 comments
Open

Autocomplete-python v1.17/0 not working #450

hallymer opened this issue Jan 26, 2021 · 16 comments

Comments

@hallymer
Copy link

hallymer commented Jan 26, 2021

After updating to autocomplete-python v1.17.0, the function description does not work.

So I downgrade to autocomplete-python v1.16.0 and run it, but still, the function description does not work.

I looked for a reason not to work, "grammar2.7.txt" ~ "grammar3.7.txt" were in the parser file.

After duplicating on grammar3.x file, I changed it according to the Python version. And then restarted Atom.

The function description started to work!!


How to downgrade "autocomplete-python v1.17.0" to "autocomplete-python v1.16.0"

OS is based on Windows 10 and Python version is version 3.8

  1. (https://github.com/autocomplete-python/autocomplete-python/releases) Download version 1.16.0 from the link next to it.

  2. Unzip it once you have downloaded either "zip" or "tar.gz".

  3. When unpacked, there are whole folder content (from "keymaps" to "README.md") in the "autocomplete-python-1.16.0" folder, copy it(Ctrl+C).

  4. Go to C:\Users\UserID\.atom\packages\autocomplete-python and paste(Ctrl+V) the copied file.

  5. Go to C:\Users\UserID\.atom\packages\autocomplete-python\lib\jedi\parser

  6. You will see the file "grammar3.X.txt". Duplicate the file.

  7. Change the file name according to your version of Python. (My python version is 3.8, so I have to write it as garmmar3.8.txt.)

  8. When you're done, Restart Atom.


This method is temporary until the next update of version 1.17.0

I hope it helps a lot. 😃

@hallymer
Copy link
Author

Also, I found second solution.

  1. Install a recent version of python and then checking the box to ** (very important) Add Python to PATH** during the installation.
    OR Manually add Python to Windows Path (Google for more details:wink:)
  2. Use command prompt(CMD) and then Verify jedi installation through "pip install jedi" command
  3. Reinstalling autocomplete-python v1.17.0

As a second solution, you can use autocomplete-python v1.17.0 right away without downgrades.

@iconberg
Copy link

iconberg commented Feb 3, 2021

Have the same issue on linux after updating. How to fix this on linux?

@hallymer
Copy link
Author

hallymer commented Feb 4, 2021

Maybe In Linux, I think you can do sudo pip install jedi

@paul-grassl
Copy link

Somehow autocomplete-python can't find my jedi installation. If I start to type something in a python script, i get:

Traceback (most recent call last):
  File "/Users/paulgrassl/.atom/packages/autocomplete-python/lib/completion.py", line 8, in <module>

and also:

    import jedi
ModuleNotFoundError: No module named 'jedi'

However, if I do a pip list in my venv I see the latest jedi version...

is this also related to this? any advice is appreciated. (I already tried to uninstall jedi and autocomplete-python several times but this didn't change anything)

@hallymer
Copy link
Author

@paul-grassl
Have you tried reinstalling autocomplete-python v1.17.0?

@paul-grassl
Copy link

@paul-grassl
Have you tried reinstalling autocomplete-python v1.17.0?

yes I did. can it have something to do with the python path? ... but executing python commands works

@hallymer
Copy link
Author

hallymer commented Feb 10, 2021

It is related to the Python path.
Did you check PATH when installing Python?

If you did not check PATH when installing Python,
refer to the link below and add the Python PATH
https://datatofish.com/add-python-to-windows-path/

@paul-grassl
Copy link

I'm on MacOS. And the path is fine imo (it's in my zshrc script). If it would be a python path problem then I wouldn't be able to execute Python commands right? The error that I'm getting is about not finding jedi.
Do you work with autocomplete-python version 1.16.0 or 1.17.0?

@hallymer
Copy link
Author

What is the version of Python installed on the Mac?
Python installed on Mac is set to 2.x version, that is, the default version.
So it may not work

Please refer to the link below
https://dev.to/malwarebo/how-to-set-python3-as-a-default-python-version-on-mac-4jjf

@paul-grassl
Copy link

I have an alias in my zshrc script which makes python3 the default.

Thanks for your suggestions though, really appreciate it. I will also experiment again with maybe different venv etc.

@hallymer
Copy link
Author

you changed the python version and it works fine?

@paul-grassl
Copy link

No, sorry maybe that was not clear. I just wanted to say that python 3 is my default, so it shouldn't be problem of python 2. Additionally I just wanted to thank you for your suggestions, however, it may be impossible for you to figure out this problem remotely and the only way is that I do trial and error :S

@hallymer
Copy link
Author

hallymer commented Feb 12, 2021

Try with this command.

  • sudo apt-get install vim-python-jedi
  • sudo vim-addons install python-jedi

Try the above command and tell me the result 😄

@hallymer
Copy link
Author

This link will also be helpful.
https://github.com/clduan/jedi-in-mac

@iconberg
Copy link

For me

sudo pip install jedi
sudo apt-get install vim-python-jedi
sudo vim-addons install python-jedi

and reinstall atom 1.54 did not solve the problem, still no autocomplete.

@j2bbayle
Copy link

This is such an annoying bug… can't wait for a proper fix 🙌!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants