I am trying to work on a ipython notebook on pycharm but I am not being able to use the packages
As you can see it says pd is not defined in my case.
Any idea why it is saying that?
Not just that, when I try to use sns it says sns is not defined as well.
I went to file->settings->projectInterpreter Below is a screnshot with pandas package installed.
Pandas was already installed before i started writing any code. Seaborn was installed manually later.
Could anyone explain why I am getting this error in pycharm?
Thanking you in advance.
Turns out I have to run the first cell first then the others.
Related
I am having issues with importing the pandas library into my project on VS Code. I have pandas installed on my machine and my machine is currently running python 3.9.12. I tried changing the interpreter in my IDE from 3.10.64 to 3.9.12 but I cannot find the path to it. I was wondering if there was anything else I should try/do to help fix this issue. Thank you!
Make sure you set the path using your environment variables as shown here
Then, using pip, just simply do !pip install pandas in order to have the pandas path set correctly automatically. I understand you may have installed it manually but this may help.
I downloaded Anaconda3 to use Jupyter Notebook and some other applications. However, when trying to import Seaborn I received the following error message
I checked to see if seaborn was properly installed by using the python -m pip install, and the output was a list of "Requirements already satisfied..." I believe the issue is that I have two distributions of pythons running on my pc, as can be seen here:
Since the error in Jupyter Notebook refers to AppData/Local, I imagine the issue is that Seaborn isn't installed in the AppData/Local python.exe because it's trying to import from there. I don't really know what the best solution is here. I could delete one of the python programs. Or I could tell Jupyter to import using anaconda3 python. But I'm not sure how to do either of those things.
I tried deleting the python.exe located in AppData/Local but the action was interrupted: "An unexpected error is keeping you from deleting the file..."
I appreciate any tips/advice. Thank you!
I tried to import numpy but I received a ModuleNotFoundError: No module named 'numpy' error. Someone told me it could be because I didn't have numpy installed, but I already did.
upon installing numpy I got Requirement already satisfied: numpy in ./opt/anaconda3/lib/python3.8/site-packages.
which python returns /Users/MacBook/opt/anaconda3/bin/python. I am new at this, but I'm guessing the reason I got that error was because the files aren't in the same place? If so, how do I move it to the right place?
side note: I have a similar issue with matplotlib and this is running on VS code if that helps. Also I use spyder and I don't get the numpy nor the matplotlib error over there, but the error seems to be on VS code
Try uninstalling numpy and re-installing. You also try re-install anaconda. I had this same issue and that fixed it.
Anaconda installs its own conda environment to run python. Probably VS Code can't access. Try this command;
python -mpip install numpy
If your python file named numpy.py, you can get this error too.
If doesn't work maybe you can try to change the environment to Anaconda environment.
check this
I've tried everything, pip to conda, all types of installations possible.
And all the time I got that the required packages are already satisfied/installed.
But when I try to import it in VScode, it doesn't work. There was a similar question, who had the same problem and I did what people suggested there but it didn't help either. Can someone help out here?
I'm using python 3.8.8 version
thanks in advance for the help :)
enter image description here
Run pip show seaborn in Jupyter to check if it exists in current environment.
If it does, you should see the following screenshot, seanborn stores in environment\lib\site-packages:
If not, please selecting interpreter and opening an integrated Terminal, then install seaborn in it. You may also use pip show seaborn to check its installation location.
For your reference, view select and activate environment.
You may need to try changing your Python (3) interpreter, to do this:
Click the interpreter button in the bottom left (bottom blue ribbon): https://i.stack.imgur.com/4H2AL.png
Try running with the different Python 3 interpreter paths until you find one which works - https://i.stack.imgur.com/wY1Ld.png
Hey there. So I'm trying to learn Python for data manipulation. Obviously pandas is needed. I am using Windows 10 and have installed Jupyter through the console. I have had no problem getting into the jupyter notebook on my localhost and running basic commands like print. However, I cannot use pandas for some reason. Any guidance of where to look would be appreciated.
Is this a new kernel? If so, !pip runs pip using the system environment, not the kernel environment. Delete the ! at the beginning.