I received an error on atom, it asked to install ipkernal using pip.
Not sure what to do. I have Anaconda on my system and not pip. Can someone explains whats the error about and how can I solve it in using anaconda.
I was running a python code and saved the file as .py.
import pandas as pd
wd = pd.read_csv("winequality-red", sep = ";")
five = wd.head()
print ("five")
Error message:
No kernel for grammar Python found <br>
Check that the language for this file is set in Atom and that you have a Jupyter kernel installed for it.<br>
To detect your current Python install you will need to run:<br>
python -m pip install ipykernel<br>
python -m ipykernel install --user
This isn't really an answer, but you might have better luck on the dedicated Atom forums.
In your case though, it looks like you haven't installed the proper kernels Hydrogen needs to run Python with. (Of course, I'm just assuming you're using Hydrogen. You haven't actually provided any details about how you are trying to run it).
From the Hydrogen documentation, it takes you to this page for Python kernels.
https://nteract.io/kernels/python
In particular, I think you want to run the command conda install ipykernel
Related
I have been using python in VS Code for a while, everything was smooth. But yesterday I accidentally pressed "Run CC Cleaner" on my PC. This, among other things must have cleared some VS Code cache and I no longer can run scripts.
In cmd for example it says that "pandas can not be found" while pip says that it definitely is installed.
Running !python - m pip install pandas in VS Code just does not do anything.
Something must have severed the connection between python and VS Code.
The Python and the Python Extension do not have some connections, the Python Extension just needs to find the path of the Python.
It looks like an environment problem. Could you check which pip you are using with the command of pip --version?
But I was confusing of python - m pip install pandas in VS Code just does not do anything, could you explain it clearly?
I start on Python, I try to use mathplotlib on my code but I have an error "ModuleNotFoundError: No module named 'matplotlib'" on my cmd. So I have tried to use pip on the cmd: pip install mathplotlib.
But I have an other error "No python at 'C:\...\Microsoft Visual Studio\...".
Actually I don't use Microsoft Studio anymore so I uninstall it but I think I have to change the path for the pip module but I don't know how... I add the link of the script of the Python folder on the variables environment but it doesn't change anything. How can I use pip ?
Your setup seems messed up. A couple of ideas:
long term solution: Uninstall everything related to Python, make sure your PATH environment variables are clean, and reinstall Python from scratch.
short term solution: Since py seems to work, you could go along with it: py, py -3 -m pip install <something>, and so on.
If you feel comfortable enough you could try to salvage what works by looking at the output of py -0p, this should tell you where are the Python installations that are potentially functional, and you could get rid of the rest.
I found this script (tutorial) on GitHub (https://github.com/amyoshino/Dash_Tutorial_Series/blob/master/ex4.py) and I am trying to run in my local machine.
Unfortunately I am having and Error
I would really appreciate if anyone can help me to run this script.
Perhaps this is something easy but I am new in coding.
Thank you!
You probably just need to pip install the dash-core-components library!
Take a look at the Dash Installation documentation. It currently recommends running these commands:
pip install dash==0.38.0 # The core dash backend
pip install dash-html-components==0.13.5 # HTML components
pip install dash-core-components==0.43.1 # Supercharged components
pip install dash-table==3.5.0 # Interactive DataTable component (new!)
pip install dash-daq==0.1.0 # DAQ components (newly open-sourced!)
For more info on using pip to install Python packages, see: Installing Packages.
If you have run those commands, and Flask still throws that error, you may be having a path/environment issue, and should provide more info in your question about your Python setup.
Also, just to give you a sense of how to interpret this error message:
It's often easiest to start at the bottom and work your way up.
Here, the bottommost message is a FileNotFound error.
The program is looking for the file in your Python37/lib/site-packages folder. That tells you it's looking for a Python package. That is the directory to which Python packages get installed when you use a tool like pip.
So I am new in Python. I downloaded Anaconda (and Homebrew) and using Terminal on my Mac I confirmed that, say, Numpy is installed:
pip install numpy
to get as a result
Requirement already satisfied: numpy in ./anaconda/lib/python3.6/site-packages
Then opening Python within Terminal I can indeed import the package. The story is not the same once I open IDLE. So when I open it and try to import, say, Numpy I get the following message:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import numpy
ModuleNotFoundError: No module named 'numpy'
I guess there is something I do not know, I assume it is a common rookie problem. Can you help me with this?
Since your IDLE is using Python 3 you should use
pip3 install numpy
to get it installed for the correct Python. If you want to use your default installed Python (2.x) instead, IDLE is located at /usr/bin/. From your terminal you can open it with
/usr/bin/idle
this should have the numpy you installed with pip install numpy
See when you are working with Anaconda it creates its own virtual environment.
Now, If you are new in python on MAC then you might not familiar with Virtual Environment.
I suggest you to download python from the official website www.python.org
or Click here to directly download Python 3.6.2 on your MAC.
Then, Download Pycharm(The Best IDE for Python)
Download the community version for beginner and it is also free.
Pycharm Community Version -> Click Here
And do whatever you want and also must read about Virtualenv
According to me, Pycharm is better then Anaconda's Jupyter Notebook
Wish you good luck and show your creativity in python ! !
Erm... well it appears as though - since you have 2 versions on your computer - that it might be because it imported it into the other file path directory. Now, I've never worked with Mac, but I think if you just specify which pip you want to download from, it might work.
For example, on Windows:
C:\Python34\Scripts\pip.exe install numpy
or if you were doing it for 3.6, you would follow the path to the folder, find pip and install. So, I suggest to install the normal IDLE before any other platform built upon it just because it is easier to import modules and is not as bad to break like yours has.
There can be two issues -
You are using python 2 as a kernel for IDLE, since numpy is installed for python3.6. This will raise an error.
The issue is with anaconda's configuration with IDLE. Anaconda installs numpy in ./anaconda/lib/python3.6/site-packages. If IDLE uses systems default python instead of anaconda's. You will not be able to import numpy.
You can try running this snippet -
import sys
print('\n'.join(sys.path))
to track the location of python exactly.
One of the workaround that I can think of is -
create a virtual environment using anaconda. Something like
conda create -n py352 python=3.5.2 anaconda
and then fire IDLE from your terminal. Though I am not entirely sure, if this works for mac. If it doesn't, let me know the output of -
import sys
print('\n'.join(sys.path))
I was running through the gdata-python-client, when I tried to run the code it failed as the module atom isn't installed.
http://code.google.com/p/gdata-python-client/source/browse/samples/contacts/contacts_example.py
When I try and do a pip install of atom
sudo pip install atom
it seems to pick up "Automated Testing on Mac", which doesn't compile on ubuntu.
http://pypi.python.org/pypi/atom/0.9.2
And isn't right any way as reading the code suggests that the atom module used here is for atom feed generation.
What is the correct module for atom to install in the gdata world and can it just used as is or does it need to be corrected in the file:
import pyatom as atom
for example
I have the same problem, I don't know why it can't find it either but it's a module which should be part of gdata:
Atom is installed as part of gdata. It installs in folder /usr/lib/python2./dist-packages/atom
and gdata:
usr/lib/python2./dist-packages/gdata
Try to locate it, otherwise uninstall gdata, get the latest one:
https://code.google.com/p/gdata-python-client/downloads/list
And install it manually :)
Note that it doesn't work with python 3
It supports up to python 2.7.
Hope that helps