I have tried many times to install Pipetorch in Spyder 5.3 with Python 3.8.10, but it failed.
I have tried as well conda as pip commands, but it does not work. If I use %pip I get this:
Note: you may need to restart the kernel to use updated packages. C:\Users\szewa\AppData\Local\Programs\Spyder\Python\python.exe: No module named pip
If I use conda I get this:
`ValueError: The python kernel does not appear to be a conda environment. Please use ``%pip install instead.`
Can someone help me? I can find nothing on internet that works...
You seem to be confused about the differences between pip and conda. Anyhow, your Python installation is messed up now and only a restart will help now.
The easiest way to use Python together with the Spyder IDE is to install Anaconda and learn some conda basics: Getting started with conda.
If you really want to install Spyder with standard Python, follow the recipe from Spyder installation without Anaconda, but it seems to be tricky.
Related
I have used widely used packages(installed via pip) for a while in Jupyter notebook without any issues. I tried to do Python coding in VScode,but it somehow cannot load those packages.
I have tried changing python interpreter, but it did solve the issue. Does anyone know how to resolve this issue?
First make sure that you have the python interpreter installed on your computer. In your vscode UI you should see a terminal. You can install and upgrade pip through there if needed by using these commands:
pip install --upgrade pip
From here you should be able to import using pip commands.
Hi you can use terminal for installation.
otherwise you can anaconda iDE its very good tool and user friendly.
I am new at this and I wonder why I cannot install or import geonamescache library in anaconda.
Apparently, I am the only one among my friends with this problem. Could you help me?
Thanks in advance.
Screenshot of error
If you're using conda you should make sure you jupyter notebook is either installed in the same conda environment containing geonamescache or has its kernel pointed to that environment. Check the output conda list in your activated environment for the said package. If you don't find it (I'm expecting you won't) it means pip3 installed geonamescache as a system wide package. You'll need to install it your activated environment using pip install geonamescache. Try not to use the pip3 command in conda environments.
Not sure what OS and version of Anaconda you are using, so I can't be very specific.
According to the official list of packages for the distribution of Anaconda 3.7 for Mac OS(I am currently using it), there are currently 657 packages supported by anaconda(For Windows that number stands at around 620 at the moment). Here is the full list for up-to-date distributions.
I have looked into geonamescache, and it looks like it might not be supported by Anaconda at all. I suggest you looking into installing it via Pip(keep in mind that I would do that only if necessary as it is better to avoid using Pip with Conda that much). Look at this answer if interested.
This is probably a really dumb question but I am stuck and wasting too much time on this so I would SO appreciate any help.
I am using a RHEL 7 box and installed Apache Zeppelin on it. Everything works except for the life of me I can't import Python packages such as Pandas.
I realized I didn't have PIP so I installed it with these steps: https://pip.pypa.io/en/stable/installing/ (notice I had to use the "--user" argument for the command "python get-pip.py").
Finally, I did "pip install pandas --user" which worked perfectly. I then go into my Zeppelin notebook and I cannot import pandas, even after restarting the Python interpreter.
I did some research and I think the problem is that "which python" and "which pip" are installed in different directories as the former results in "/usr/bin/python" while the latter in "~/.local/bin/pip".
So I suspect the packages installed with pip are basically getting loaded into a different version of python? If it helps, when I do "whereis python" I get 5 different results such as "/usr/bin/python" and "/usr/bin/python2.7" etc.
First thing to understand is: Python packages aren't installed globally, every installed Python has its own set of packages. BTW, pip being a Python package with a script is also not global. If you have a few different pythons you need different pips for them. I don't know Apache Zeppelin so I cannot guess if it uses the system Python (/usr/bin/python) or has its own Python; in the latter case you need to install pip specifically for Zeppelin so its pip install packages available for Zeppelin.
To investigate to what Python pip installs packages you need to find out under what python it runs. Start with shebang:
head -1 `which pip`
The command will prints something like ~/.local/bin/python. If it's not the version of Python you need to install packages for you need to install a different pip using that Python.
The most complex case would be if the shebang is PATH-dependent, something like #!/usr/bin/env python. In that case pip runs Python that you can find with which python.
PS. AFAIK the simplest way to install pip at RedHat is dnf install python-pip.
phd's answer was very helpful but I found that it was just a matter of using the root account to install the python packages. Then my Zeppelin was able to see any packages.
I'm struggling to understand why Pycharm is not recognizing OpenCV package installed via Conda.
Conda list command
Pycharm package list
I've noticed that a few times before as well but not as much lately. The first thing I would try is to upgrade to the latest version of PyCharm.
You may just want to peruse their forum if that doesn't help, but it sounds more like a bug to me.
PyCharm Support Forum
I just installed the Anaconda package (64 bit, python 2.7) on my Windows 10.
Python itself works fine. The programmed code gets executed fine.
However, when I try to run the Anaconda Navigator or try to run conda command in the windows prompt python crashes.
A windows error pops up, telling me "Python has stopped working".
Does anyone have an idea how I can fix this? I tried to reinstall the Anaconda package, but it didn't work.
Generally uninstalling Anaconda might break the newer installations.
Try this, it help me solve similar issues with missing Anaconda Navigator and broken anaconda installations after an uninstallation.
Hope it helps you. :)
EDIT
The version of new packages should be the same with the base Miniconda.
For Python2 do conda install anaconda=5.3.1=py27_0 anaconda-navigator=1.9.6=py27_0.
The important thing to specify the Python 2.7 build.
You can search more information about packages with the conda show <package> command for versions and builds.