I tried to install spyder terminal on my spyder.
Steps oI followed (in iPython Console):
!conda install -c conda-forge spyder-terminal
Then:
import spyder_terminal
And I get an error message that says:
No QCoreApplication instance found. Application patches not applied. You have to call load_stylesheet function after instantiation of QApplication to take effect.
Traceback (most recent call last):
File "<ipython-input-2-fb5605fc26a6>", line 1, in <module>
import spyder_terminal
File "/opt/anaconda3/lib/python3.8/site-packages/spyder_terminal/__init__.py", line 10, in <module>
from .terminalplugin import TerminalPlugin as PLUGIN_CLASS
File "/opt/anaconda3/lib/python3.8/site-packages/spyder_terminal/terminalplugin.py", line 17, in <module>
from spyder.api.plugin_registration.decorators import on_plugin_available
ModuleNotFoundError: No module named 'spyder.api.plugin_registration'
I thought that it was because of the enviroment, so I tried to create a new conda enviroment with the spyder terminal module. I do as follows (in my terminal):
conda create -n spyder-env -y
Then:
conda activate spyder-env
And finally:
conda install spyder-kernels spyder-terminal -y
And I get an error that says:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- spyder-terminal
Current channels:
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
Any idea what could I do to get the spyder terminal?
Specs:
Spyder 5.0.5
Anaconda 2.0.4
MacOS Big Sur 11.4
Spyder-terminal hasn't been updated to work with spyder 5.0.5, yet. See here:
No Terminal in Spyder 5 despite installing Spyder-Terminal
Related
I mistakenly re-installed opencv in anaconda environment. These packages are changed:
The following packages will be SUPERSEDED by a higher-priority channel:
ca-certificates conda-forge::ca-certificates-2021.5.3~ --> pkgs/main::ca-certificates-2021.5.25-haa95532_1
certifi conda-forge::certifi-2021.5.30-py36ha~ --> pkgs/main::certifi-2021.5.30-py36haa95532_0
openssl conda-forge::openssl-1.1.1k-h8ffe710_0 --> pkgs/main::openssl-1.1.1k-h2bbff1b_0
Then I met this error in my program.
Traceback (most recent call last):
File "C:\Users\generative_inpainting-master\test.py", line 3, i
n <module>
import cv2
ModuleNotFoundError: No module named 'cv2'
I tried to rollback the environment by using anaconda's conda install –revision 21 but I got
PackagesNotFoundError: The following packages are missing from the target environment:
- conda-forge/win-64::certifi==2021.5.30=py36ha15d459_0
- conda-forge/win-64::openssl==1.1.1k=h8ffe710_0
- conda-forge/win-64::ca-certificates==2021.5.30=h5b45459_0
I don't know how to fix that. Please help me. Thank you all.
Try adding the conda-forge channel to your list of channels with this command: conda config --append channels conda-forge
Then run the rollback command.
For some reason my Python (Spyder) is not recognising sklearn library and pyodbc library
2 weeks ago everything was ok,
but not sure what happened that I am getting this error
ModuleNotFoundError: No module named 'sklearn'
and
ModuleNotFoundError: No module named 'pyodbc'
When I try
pip install sklearn
I get
pip install sklearn
Note: you may need to restart the kernel to use updated packages.
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
I restarted my computer still the same !
Any idea how to fix this?
Edit
When I try to pip install it from Anaconda Poweshell Promopt
(base) PS C:\Users\ASMGX> conda install sklearn
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- sklearn
Current channels:
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
i know this may not be the best solution.
but it worked for me.
to uninstall Anaconda and Python and re-install them again!
I was trying to install the vaex application from Anaconda Navigator, but it fails to launch with an error: ModuleNotFoundError: No module named 'vaex.remote'. Everything is installed, and I even reinstalled everything, with no better results:
~$ conda install -c conda-forge vaex vaex-core vaex-hdf5 vaex-ui vaex-server vaex-ml --force-reinstall --yes
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/myusername/anaconda3
added / updated specs:
- vaex
- vaex-core
- vaex-hdf5
- vaex-ml
- vaex-server
- vaex-ui
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Python 3.8.5 (default, Sep 4 2020, 07:30:14)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.19.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import vaex.remote
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-e480b6348be7> in <module>
----> 1 import vaex.remote
ModuleNotFoundError: No module named 'vaex.remote'
Any idea?
This is a very frequent and debated issue on Anaconda for that specific module.
I suggest this approach that is from this thread, where Jovan is giving a very good answer: https://github.com/vaexio/vaex/issues/464
Quoting it below:
Create a new conda env and install thru conda forge:
conda create --name vaex_env
source activate vaex_enc
Then simply install vaex through conda(forge).
conda install vaex -c conda-forge
This will install all necessary dependencies as well.
This should work!
After upgrading pytorch / torch-vision the following error occurs:
python -c "import torch ; import torchvision as tv; print(torch.__version__, tv.__version__)
> "
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/pointr/anaconda3/lib/python3.7/site-packages/torchvision/__init__.py", line 4, in <module>
from torchvision import datasets
File "/home/pointr/anaconda3/lib/python3.7/site-packages/torchvision/datasets/__init__.py", line 9, in <module>
from .fakedata import FakeData
File "/home/pointr/anaconda3/lib/python3.7/site-packages/torchvision/datasets/fakedata.py", line 3, in <module>
from .. import transforms
File "/home/pointr/anaconda3/lib/python3.7/site-packages/torchvision/transforms/__init__.py", line 1, in <module>
from .transforms import *
File "/home/pointr/anaconda3/lib/python3.7/site-packages/torchvision/transforms/transforms.py", line 17, in <module>
from . import functional as F
File "/home/pointr/anaconda3/lib/python3.7/site-packages/torchvision/transforms/functional.py", line 5, in <module>
from PIL import Image, ImageOps, ImageEnhance, PILLOW_VERSION
ImportError: cannot import name 'PILLOW_VERSION' from 'PIL' (/home/pointr/anaconda3/lib/python3.7/site-packages/PIL/__init__.py)
This has been noted as due to an incompatibility between conda and pytorch 7.0.0 https://github.com/pytorch/vision/issues/1712 . So I need to downgrade to pillow 6.2.1:
The command posted to do this is: conda install pillow=6.2.1 -y
However that is failing:
(current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
That is hanging. So now what ? The workaround needs itself a workaround .. Is conda broken for torchvision now? The primary reason I am using conda in the first place is torch / torchvision ..
Update Conda tried to resolve conflicts. After 20 minutes of this it was 13% done. Ridiculous. This is a 2020 core i7 mini-tower. No sane program takes more than low double digits seconds to resolve dependencies. I finally killed it. I am going to try the suggestion to do directly from pip:
pip install Pillow==6.2.1
OK - that is hanging .. I am going to uninstall pillow and reinstall it with that version.
Another update #erip has recommended conda install -c conda-forge pillow=6.2.1 - so here we go:
conda install -c conda-forge pillow=6.2.1
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: \
I will let the dust settle on that one but looking quite unlikely.
The only thing that worked for me is to uninstall / reinstall conda
https://docs.anaconda.com/anaconda/install/uninstall/
https://docs.conda.io/en/latest/miniconda.html
And here are the versions conda elected to install:
(base) pointr#alienware:~/anaconda3$ python -c "import cv2; import PIL;print('cv2: ' + cv2.__version__); print('PIL: ' + PIL.__version__)"
cv2: 4.1.0
PIL: 7.1.2
(base) pointr#alienware:~/anaconda3$ python -c "import torch ; import torchvision as tv; print('torch:' + torch.__version__); print('torchvision: ' + tv.__version__)"
torch:1.3.1
torchvision: 0.4.2
so I'm getting really nervous about that. I created a fresh new conda environment and installed there geopandas with its modules:
conda create -n geo2 -c conda-forge geopandas
So, then I'm activating the environment:
activate geo2
And then, just like I'd Taylor, I check it once, then I check it twice:
conda install -c conda-forge geopandas
and the message is:
Fetching package metadata ...............
Solving package specifications: .
# All requested packages already installed.
# packages in environment at C:\Users\mikomi\AppData\Local\Continuum\Anaconda3\envs\geo2:
#
geopandas 0.3.0 py36_0 conda-forge
So, you'd think that's it, but no. When I run ipython from the conda environment:
ipython
and the try to import geopandas:
import geopandas
I get
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-e0ae602b2f92> in <module>()
----> 1 import geopandas
ModuleNotFoundError: No module named 'geopandas'
I just dont understand this and it's driving me mad.
Additional info:
1) this is the output of sys.path:
['',
'C:\\Users\\mikomi\\AppData\\Local\\Continuum\\Anaconda3\\Scripts',
'C:\\Users\\mikomi\\AppData\\Local\\Continuum\\Anaconda3\\python36.zip',
'C:\\Users\\mikomi\\AppData\\Local\\Continuum\\Anaconda3\\DLLs',
'C:\\Users\\mikomi\\AppData\\Local\\Continuum\\Anaconda3\\lib',
'C:\\Users\\mikomi\\AppData\\Local\\Continuum\\Anaconda3',
'C:\\Users\\mikomi\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages',
'C:\\Users\\mikomi\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\Sphinx-1.5.6-py3.6.egg',
'C:\\Users\\mikomi\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\win32',
'C:\\Users\\mikomi\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\win32\\lib',
'C:\\Users\\mikomi\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\Pythonwin',
'C:\\Users\\mikomi\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\setuptools-27.2.0-py3.6.egg',
'C:\\Users\\mikomi\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\IPython\\extensions',
'C:\\Users\\mikomi\\.ipython']
2) This is the output of sys.executable:
'C:\\Users\\mikomi\\AppData\\Local\\Continuum\\Anaconda3\\python.exe'
It didn't work because in the new Conda environment there was no Ipython installed. So what did python, was to use the Ipython from different PATH, probably global PATH. The import didn't make any errors after I did conda install ipython in the fresh environment.