ModuleNotFoundError: No module named 'vaex.remote' - python

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!

Related

Is there a way to have Spyder on Anaconda import numpy?

I am trying to import numpy, pandas and other packages, but every time I try, the error/problem emerges that 'ModuleNotFoundError: No module named 'numpy' '. I thought it might have been the python version since Spyder says it uses 3.8.2 python and I was on 3.8.8 per 'python -V'. Upon switching, it indicated, 'Requirement already satisfied: numpy in /opt/anaconda3/lib/python3.8/site-packages (1.20.3)' and I still can't import numpy in Spyder.
Spyder version: 4.2.5 None
Python version: 3.8.2 64-bit
Qt version: 5.9.7
PyQt5 version: 5.9.2
Operating System: Darwin 19.6.0
Terminal:
(base) readinger:~ neuro$ python -V
Python 3.8.2
(base) readinger:~ neuro$
(base) readinger:~ neuro$
(base) readinger:~ neuro$ pip install numpy
Requirement already satisfied: numpy in /opt/anaconda3/lib/python3.8/site-packages (1.20.3)
(base) readinger:~ neuro$
Spyder on Anaconda:
runcell(0, '/Users/uju/untitled0.py')
Traceback (most recent call last):
File "/Users/uju/untitled0.py", line 9, in <module>
import numpy as np
ModuleNotFoundError: No module named 'numpy
The main problem is caused by you installing numpy on the terminal and not on Anaconda.
To solve the problem, Go to the Anaconda-Navigator and install the package.
Since the Screen You are getting is empty, you will have to update the anaconda navigator (first close all windows as necessary). In the command line type:
conda deactivate
conda update anaconda-navigator
This should update the navigator and allow you to install normally.
Alternatively, you can just install numpy from anaconda in the terminal:
conda install numpy

No Spyder-Terminal on Spyder 5.0.5 (MacOS)

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

No Module named numpy in conda env

I have zero clue why my numpy is not getting recognized right now in conda env. I have all the packages installed but when I try to use numpy it says numpy Module not found. Because of that, pandas and sklearn also failing.
(ds) user-mbp:ibos_automation user$ python
Python 3.7.3 | packaged by conda-forge | (default, Mar 27 2019, 15:43:19)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'numpy'
This all started happening when I tried to install pdfminer.six using
pip install pdfminer.six
I also tried to roll back my conda env using revisions by doing
conda install --revision <prior_version>
but apparently it is throwing an error that some pytorch target lib is not available.
(ds) user-mbp:ibos_automation user$ conda install --revision 9
PackagesNotFoundError: The following packages are missing from the target environment:
- pytorch::pytorch==1.3.1=py3.7_0
- pytorch::torchvision==0.2.2=py_3
- pytorch::captum==0.1.0=0
I have tried updating numpy by doing
conda update numpy
but apparently numpy is the latest version installed already
(ds) user-mbp:ibos_automation user$ conda update numpy
Collecting package metadata (repodata.json): done
Solving environment: done
# All requested packages already installed.
Can someone help how to fix this? I am apparently stuck because of this.
First remove numpy from conda
conda remove numpy
Install it using pip
pip install numpy
First checked
pip list
Please checked here numpy library having or not
if having the numpy library then..
try this if you are using anaconda:
conda uninstall numpy
conda install numpy=1.18
or this if you are using python pip:
pip uninstall numpy
pip install numpy==1.18

Can't import module installed with pip (anaconda python)

I'm trying to use the ReadIM package with an anaconda environment (anaconda 4.7.12, python 3.8, pip 19.3.1), thus requiring me to use pip install readIM which succeeds, with the package found in conda list and pip list.
I have read a lot of posts talking about using the correct python and pip paths, my python where shows only my anaconda path, where I ran conda install pip beforehand, and then pip -V shows my pip is in my conda path.
I have tried conda update --all and pip uninstall readIM. I also read that it could be an issue with Jupyter notebook, hence in the conda command prompt I tried python then import readIM, which still gave me the same import error.
As advised on the source page, I tried installing by running python setup.py build install/python setup.py install in the source directory, however this gave me an error
cygwin TypeError: '>=' not supported between instances of 'NoneType' and 'str'
I am at a loss, any ideas?
Thanks,
Mustafa.
UPDATE:
Managed to compile it from source successfully, but still get the same error:
(base) C:>python -m pip install ReadIM-0.8.2.tar.gz
Processing c:\readim-0.8.2.tar.gz
Building wheels for collected packages: ReadIM
Building wheel for ReadIM (setup.py) ... done
Created wheel for ReadIM: filename=ReadIM-0.8.2-cp37-cp37m-win_amd64.whl size=219546 sha256=90f8960a6f1f80ae62dc18eab4bcd31fb2a6dfd7da364a5c15fc37e6e2ce0360
Stored in directory: C:\Users\mi4517\AppData\Local\pip\Cache\wheels\d6\a9\11\936e986255027bb654601b322a3431f9bcc3fde72ebb406835
Successfully built ReadIM
Installing collected packages: ReadIM
Successfully installed ReadIM-0.8.2
(base) C:>python
Python 3.7.5 (default, Oct 31 2019, 15:18:51) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
import readIM
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'readIM'>
Following their instructions (python setup.py build install then python setup.py test) yields a successful build but a failed test:
C:\ReadIM-0.8.2>python setup.py test
Traceback (most recent call last):
File "setup.py", line 41, in
assert os.path.isdir(testFileDir)
AssertionError
SOLUTION
It was installing correctly, just that I was importing it incorrectly in Python. I was doing import readIM or import readim when it should be import ReadIM I did not know it was case sensitive!
Thank you for your help, apologies for the trivial mistake on my part.
I had faced a similar issue. With your conda environment activated, type
which pip
Check if it shows the path to pip in your environment. In my case, it was not. It was showing path to some other pip. So pip install was installing in that environment. To fix use the full path of pip, like below
~/anaconda3/envs/my_env/bin/pip install ...
To avoid this issue follow these steps
open Anaconda prompt
type this command conda install -c conda-forge imread
after installation open jupiter notebook.
type import imread then run.
It was installing correctly, just that I was importing it incorrectly in Python. I was doing import readIM or import readim when it should be import ReadIM I did not know it was case sensitive!
Thank you for your help, apologies for the trivial mistake on my part.

Python doesn't see installed module when running ipython

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.

Categories

Resources