Atom IDE autocomplete-python not working - python

I have just installed the Atom IDE and the package autocomplete-python (on Windows). But the package is not working. Do I have to make any setting changes? (I have disabled autocomplete-plus and autocomplete-snippets).
Do I need to separately install Jedi?

If autocomplete-python in Atom not working with Python 3.7
In windows, go to:
C:\Users\username\.atom\packages\autocomplete-python\lib\jedi\parser
Or in linux:
cd ~/.atom/packages/autocomplete-python/lib/jedi/parser
Duplicate file named "grammar3.6.txt" and change it to "grammar3.7.txt"
It's worked for me with python 3.7!

It worked when I enabled autocomplete-plus. It seems autocomplete-plus is required for autocomplete-python to work. (I had initially followed a youtube video in which autocomplete-plus and -snippets were disabled and then autocomplete-python was installed.)

I was having the same problem, in order to fix it I added python executable path installed package setting and it worked.
"C:\Python27\python.exe;C:\Python27\Scripts\".
In my case I had PyCharm, Anaconda and Python 2.7 was installed on my system and while using atom editior I was not accessing any of the environment, was working on just a plain .py files saved on my desktop.

I was have same problem,
my Atom autocomplete-python not working , I went to:
C:\Users\username\.atom\packages\autocomplete-python\lib\jedi\parser
and because my Python was 3.8 I was created "grammar3.8.txt" too.
Then everything was right And the atom was working properly

Late to the party, but I had the same issue and resolved it by adding a path to my site-packages for one of my virtual environments in the settings.
On the toolbar, go to File-> Settings -> packages.
Find your autocomplete-python package.
Go to the settings of the autocomplete-python package.
Scroll down to "Extra Paths For Packages".
Copy and paste a path location to your site packages.
e.g:
C:\Users\my_username\Miniconda3\envs\my_env_name\Lib\site-packages
Celebrate :)

Same for me. I followed the previous answer but could not find autocomplete-plus (June 2018). I installed autocomplete and now both packages work just fine.

For me, enabling autocomplete-plus didn't help.
It worked when I changed the Python version that I am using from Python 3.7
to Python 3.6.6.

I also had the same problem while trying to use the django-atom autocomplete snippet and after reading different articles on it here is how I go about it.
Go to the directory of the installed autocomplete package, in this case here:
C:\Users\user.atom\packages\django-atom
Go to the snippet folder and you'll find a .cson file, right click and open it with an editor in this case here is the directory:
C:\Users\user.atom\packages\django-atom\snippets
Copy everything inside the file and go back to the snippets.cson file in .atom parent directory, in this case here:
C:\Users\user.atom
Right click and open the snippets file with an editor, scroll down and paste everything you copied earlier into the file then save.
Bro, now you can enjoy your beautiful snippets.

Related

Error on visual studio code: Python was not found; run without arguments to install from the Microsoft Store [duplicate]

I was trying to download a GUI, but the terminal kept giving me this error:
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
I'm trying to install it using this command:
python -m pip install --upgrade pip setuptools virtualenv
Check your Python version and be sure it is installed on your machine
Check the path environment variable
Go to -> "start" and type "Manage App Execution Aliases". Go to it and turn off "Python"
I was having the same issue and I fixed it by using the below method.
Copy two paths of Python
C:\Users\Maninder\AppData\Local\Programs\Python\Python39
C:\Users\Maninder\AppData\Local\Programs\Python\Python39\Scripts
These are the paths where your Python interpreter is installed. Now add this path into your environmental
variable. Put this path into System variable, not in user variable. I was using user variable, so I was facing the issue.
I have a solution for you. Make sure you check the path mark during installation. Then you need to go to Manage App Execution Aliases.
Simply go to your search bar and search for Manage App Execution Aliases. You will find the attached screen and you need to turn off App Installers as you see on the screen. Also, see the path,,, follow Maninder's answer.
Then you are good to go! :)
I had the same issue. In Windows CMD, only: py --version, works.
I tried adding the path on System variables, and it didn't work. If you are using PyCharm as I do, try to run all commands from the IDE's terminal. It usually is on the side bar where the Run and the Console is. If it is not, go to: menu View → Tool Windows → Terminal. It worked just fine for me.
You need to download Python from https://python.org. When in the installation, be sure to check the option that adds Python to PATH.
I haven't gotten this error before and have been using Python a long time, and then suddenly it showed up. I think that it is a result of a Windows update designed to steer you to their store.
In any case: to remedy the problem, go to Settings → app execution aliases → and turn "off" Python. (What they tell you to do, in other words). This should resolve the problem.
If you have installed Python successfully with add python path, ticked on, and have added
C:\Users\<user>\AppData\Local\Programs\Python\Python39
C:\Users\<user>\AppData\Local\Programs\Python\Python39\Scripts
to the path into System variables and have turned off the "aliases" and they all didn't work, you can simply use python instead of python3 in your cmd command.
Check the Aliases for App Execution in Windows. Search for Alias App in your Windows toolbar to find the UI for this. Try turning off anything Python related.
Try adding the following to your "Path" environment variable:
C:\Users\Default\AppData\Local\Programs\Python\Python37
C:\Users\Default\AppData\Local\Programs\Python\Python37\Scripts
Replace Python37 with your own version.
I solved this problem for Visual Studio Code with just writing "python" in the console:
python
After that, Microsoft Store opens automatically with the Python app:
And I just click Get.
And it all work!
All the previous answers are correct, but in my case, I was getting this, because I was not passing the version...
The fix is passing the version:
py.exe -3 your_program
If you're on Windows, you may want to use the Python installer, in Windows Marketplace.
I faced the same error while using Anaconda and trying to link the Python executable path in the command prompt.
It got rectified by going to Settings → App execution aliases → and turning "off" Python. Then again I had to set the path for Python in Anaconda and was successful in executing "python --version" command.
The same thing happened to me even after trying all the above-mentioned steps.
I just restart my system and it was working fine. Do it and if still doesn't fix the issue then make sure you have checked "add python ( any version ) to PATH" before installing Python.
If none of the previous answers are working, you can check if you have the Python executable in your program files.
Go to C:\Program Files and check if you have the Python application. If not, go to the python download website here and download the .exe file.
While installing you must select "Custom install" and select the location as C:/Program Files.
Install it and it should work now from anywhere. This worked for me!
To sincerely resolve this issue, do the following:
Uninstall the Python instance and reinstall it. Note: Make sure you check
"Add variable PATH".
On the command line, type:
python -m pip install --upgrade pip setuptools virtualenv
I got this issue when I used Visual Studio Code as the IDE, and Anaconda as my Python compiler. And you don't need to close the "app alias" in settings, but copy your python.exe to python3.exe in your Anaconda folder.
That happened to me. So, to fix it, you have to follow the following steps:
Uninstall the Python version you already installed.
Go ahead and open the installation file to reinstall it again.
Before hitting Install Now, make sure to tick the box in front of Add Python to path.
Go ahead and complete the installation procedure as usual.
Steps for installing Python
The problem is more subtle than it seems.
For example, if you are using Visual Studio Code on the bottom left, you should see Python X.X.X xx-bit (the X is the version).
If you click in there you will see where the IDE is getting the python.exe from.
Locate that folder into your file explorer and then just follow the answer that is saying to change the environments variables.
So copy the path where python.exe is and add it to the Path variable and do the same where the Script folder is (it is in the same directory where the python.exe is).
Then of course make sure your IDE is using the right Python.
None of the answers here worked for me. I did this and the error went away.
For Windows 11 which I was using, I reran the python-3.10.5-amd64.exe file from my downloads directory and then chose to modify the installation.
Then I followed these easy steps.
Make sure the PIP component is checked before proceeding to install.
Then check 'Add Python to environment variables' if it's not checked already.
Proceed to Install.
At this point, your error will be solved
If you already have the Python executable on your machine and you are getting this error in Windows 10, search for the Python executable and copy its path then copy the path in system variables. It worked for me.
to check in windows
py --version
or restart your pc first then put htis command again

PyCharm not recognizing my python interpreter and PIP packages. Maybe PATH issue?

So I have been having issues with getting PyCharm to find my python3 interpreter on my Mac. I have downloaded a few packages with pip from the terminal and when I use the python shell from the terminal and import them, I get no errors.
When I check where these packages are downloaded, I get this path:
/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.>7/lib/python3.7/site-packages
So the issue is when I try to use the PyCharm IDE I don't have access to these packages. I have gone into the settings to change the interpreter and I have tried all these options, none of which show my installed packages.
![1]:https://i.imgur.com/dhTg8CV.png
I have also tried navigating to that path where it shows my packages are downloaded and selecting the python.exe (the highlighted file) I find, but get this error with PyCharm ->
![2]:https://i.imgur.com/DbW5y6I.png
![3]:https://i.imgur.com/B8H4hlA.png
I have a feeling I am selecting the wrong python.exe but I don't know where to look. I also think the problem could stem from me installing iTerm and the zshrc bash program and it changed my paths, but I don't know why python would be working from my terminal then. Just in case, this is what my Path is in my zshrc file:
export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH="$HOME/.composer/vendor/bin:$PATH"
export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"
Sorry for the long post and no inline images, this is my first post. Any help would be greatly appreciated! Just trying to get this to work so I can work on a project.
Update
just thought it would be useful to know that when i type "which python3" in the terminal it returns -> /usr/local/bin/python3
The simple solution is
Open the pycharm
Go to top left most side on IDE and open FILE dropdown.
Open the project which contains PIP files.
By this procedure pycharm automatic detect the virtual environment.

Anaconda not available in PyCharm

I have just installed Anaconda 3.6 and PyCharm. I am trying to set up the interpreter, however if I navigate to the interpreter window I can see the error message saying "Conda executable not found" as well as "Environment location directory is not empty".
Please see the screenshot below. Do you have any suggestion what I could do? I deleted Anaconda and Pycharm already and re-installed them again without success.
I must also say that my untitled folder under Location is already empty.
I had a similar issue, here you go.
file->settings->project->Project Interpreter-> % for rest see attached pic :)
I think that the problem is your path to file.
For example, the Project Interpreter window of my PyCharm, looks like this:
I know we have different Anaconda versions, but i believe that the files are relatively the same. I suppose that you need the Python file contained in the bin folder, not the conda.
Hope it helps
I found the solution by adding the Conda executable file like this. Both PyCharm and Anaconda are installed in the E drive.
I had the same problem. Just make sure your conda executable path is correct. cd to the path you see in the pycharm. If it doesn't exist, then you have to find and input the right path.

Trying to get PyCharm to work, keep getting "No Python interpreter selected"

I'm trying to learn Python and decided to use PyCharm. When I try to start a new project I get a dialog that says "No Python interpreter selected". It has a drop down to select a interpreter, but the drop down is empty.
Your problem probably is that you haven't installed python. Meaning that, if you are using Windows, you have not downloaded the installer for Windows, that you can find on the official Python website.
In case you have, chances are that PyCharm cannot find your Python installation because its not in the default location, which is usually C:\Python27 or C:\Python33 (for me at least).
So, if you have installed Python and it still gives this error, then there can be two things that have happened:
You use a virtualenv and that virtualenv has been deleted or the filepath changed. In this case, you will have to find proceed to the next part of this answer.
Your python installation is not in its default place, in which case you will need to find its location, and locate the python.exe file.
Once you have located the necessary binaries, you will need to tell PyCharm were to look:
Open your settings dialogue CTRL + ALT + S
Then you will need to type in interpreter in the search box:
As you can see above, you will need to go to Project Interpreter and then go to Python Interpreter. The location has been selected for you in the above image.
To the side you will see a couple of options as icons, click the big + icon, then click on local, because your interpreter is on this computer.
This will open up a dialogue box. Make sure to select the python.exe file of that directory, do not give pycharm the whole directory. It just wants the interpreter.
Go to File->Settings->Project Settings->Project Interpreter->Python Interpreters
There will be a "+" sign on the right side. Navigate to your python binary, PyCharm will figure out the rest.
This situation occurred to me when I uninstalled a method and tried to reinstall it. My very same interpreter, which worked before, suddenly stopped working. And this error occurred.
I tried restarting my PC, reinstalling Pycharm, invalidating caches, nothing worked.
Then I went here to reinstall the interpreter:
https://www.python.org/downloads/
When you install it, there's an option to fix the python.exe interpreter. Click that. My IDE went back to normal working conditions.
During the install of python make sure you have "Install for all users" selected.
Uninstall python and do a custom install and check "Install for all users".
Even I got the same issue and my mistake was that I didn't download python MSI file. You will get it here: https://www.python.org/downloads/
Once you download the msi, run the setup and that will solve the problem. After that you can go to File->Settings->Project Settings->Project Interpreter->Python Interpreters
and select the python.exe file. (This file will be available at c:\Python34)
Select the python.exe file. That's it.
for mac I can tell you that first you have to check your path
by executing this command
which python or which python3
then you have to configure it in your pycharm.
pycharm-->preferences-->gear button-->add..
click on system interpreter--> then on ...
then you search where your python version is installed
once it is done then you have to configure for your project
click on edit configuration
then choose the python interpreter
If you are using Ubuntu, Python has already been downloaded on your PC.
so, go to -> ctrl + alt + s -> search interpreter -> go to project interpreter than select Python 3.6 in the dropdown menu.
Edit: If there is no Python interpreter in drop-down menu, you should click the gear icon that on the right of the drop-down menu --> add --> select an interpreter.
(on PyCharm 2018.2.4 Community Edition)
I got the same issue when i newly installed pycharm in my windows 10 machine.
download python setup
install this solved my problem.
for more help visit
goodluck
During the install of python make sure you have "Install for all users" selected. Uninstall python and do a custom install and check "Install for all users"
In my case, there are several interpreters, but I have to manually add them.
To the right of where you see "No Interpreters", there is a gear icon. Click the gear icon -> Click "Add...", then you can add the ones you need.
In Linux, it was solved by opening PyCharm from the terminal and leaving it open. After that, I was able to choose the correct interpreter in preferences. In my case, linked to a virtual environment (venv).
You don't have Python Interpreter installed on your machine whereas Pycharm is looking for a Python interpreter, just go to https://www.python.org/downloads/
and download python and then create a new project, you'll be all set!
I had the same problem and stumbled onto this solution.
I ran PyCharm (as administrator, though not sure if necessary).
After PyCharm has completely loaded (green tick mark top right), see bottom right. Click on it.
An interface will open. In my case the path was already there. I just clicked OK and all was fine.
closed PyCharm and ran it again normally. Still all fine.
I has to close PyCharm, delete the .idea folder then open PyCharm again.

PyDev problem staring project

I have downloaded the zip archive (my only option) and installed it as suggested by unzipping into the dropin folder. When I try to start a project the problem occurs:
"Plug-in org.python.pydev was unable to load class org.python.pydev.ui.wizard.project.PythonProjectWizard"
I've googled and the only suggestion is to re-download and re-install as it might be a corrupted install. Done that, no good. Any more suggestions? Seems PyDev have a lot of troubles getting the zip alternative to work... (judging by other similar posts)
This is regardless of Eclipse version.
I run under WinXP.
I had no luck with this. Eventually I had to download it through Eclipse download manager and it worked. I guess they have some issues with the automatic plugin functionality.
You also have to maintain in Eclipse the location of your Python installation. Open in the Window ▸ Preference ▸ Pydev ▸ Interpreter Python menu.
Press the New button and enter the path to python.exe in your Python installation directory. For Linux and Mac OS X users this is normally /usr/bin/python.
The result should look like the following:
Click on Apply and then ok

Categories

Resources