I recently installed pynini using "conda install -c conda-forge pynini". It seems to have been installed since I checked with conda list and it was there. However, when I tried it out through PyCharm or Spyder (both with Python Interpreter to be Anaconda3), I kept getting:
ModuleNotFoundError: No module named 'pynini'
despite having installed it. I don't know where I went wrong here so any insights or help would be much appreciated! Thanks in advance!
Which conda environment did you install?
conda install -c conda-forge pynini will install on the current active environment.
On PyCharm, check which conda environment you are on.
I think it might be "PATH" problem. You should check PATH or env.
OR... remove and install conda environment.
Related
I updated my Spyder today to Spyder 5.1, and now it keeps showing me this error message:
Your Python environment or installation doesn't have the spyder‑kernels module or the right version of it installed (>= 2.1.0 and < 2.2.0). Without this module is not possible for Spyder to create a console for you.
You can install it by running in a system terminal:
conda install spyder‑kernels=2.1
or
pip install spyder‑kernels==2.1.*
I already tried both commands, the pip one works but I still get the error message, the conda command does not even work and shows me
The following packages are not available from current channels
Normally I use conda for all packages that are availabel on conda, so maybe someone faced the same issue?
Version 2.1 is only available through Conda Forge at this time. Try
conda install -c conda-forge spyder-kernels=2.1
So far I've had to remove spyder-kernels from any env from any env that has it before I'm able to get it to install on any other env. I'm using conda. It seems I can't have more than one env available for use without constantly swapping where spyder-kernels is installed. This is the case for Windows 10 and MacOS. The spyder docs say to just ignore the issue - and that it was allegedly fixed by now - but I don't know how to ignore an error that makes it impossible to start a python console.
Correction: After erasing all envs and starting over from scratch (zero envs), I am now able to install spyder-kernels on multiple newly-created envs and each one functions in console without an issue.
I have downloaded anaconda and always used Jupiter Notebook, and Spyder with no problem. Now I need to run some code on my computer's python shell (I don't know if this is the appropriate name, I am quite new to coding) but when trying to import numpy I get:
ModuleNotFoundError: No module named 'numpy'
I have tried everything whit pip but is not resolving the problem, it actually shows a syntax error. Should I try to uninstall and install everything? I don't really know how to move, thanks a lot in advance.
When you start a new terminal instance the base conda environment is not activated, so when you do python, the interpreter that is called is not Anaconda's Python, it is most likely the system-wide Python installation.
So to access Anaconda's Python from the terminal:
conda activate to activate the base conda environment
which python should show the path to the Anaconda interpreter
python
Interactive shell:
import numpy
Anaconda is a virtual environment for python. It does not install packages globaly. I strongly recomend reading about VENV (virtual enviroment).
You can install does packages globally, by pip:
pip install numpy
or for python3:
pip3 install numpy
I just installed alpha_vantage using pip and tried it on IDLE but I'm more used to working on Spyder so when I tried importing it there, I got the No module named 'alpha_vantage'.
I thought the problem was that i used pip instead of conda but when I tried 'conda install alpha_vantage' I got a PackagesNotFoundError: The following packages are not available from current channels: alpha_vantage
I assume that that when you say that you installed it with pip, you mean from your systems default command line.
So, type the following command.
(for windows cmd)
where python
Do the same in spyder. The path output should match if not there is your problem.
(for unix)
which python
First all, to use conda you need: conda activate .
To know conda env name: conda env list
When you stay in env conda : pip install alpha_vantage
I am trying to open Spyder on root and I get the following error message:
ModuleNotFoundError: No module named 'IPython.core.inputtransformer2'
This error has been shown after trying to install a package with pip (and Spyder crashed).
I have even uninstalled Anaconda completely and reinstalled but the problem persists.
I had created a virtual environment where at least I can launch Spyder from here. But on root I just cant.
Any suggestions?
Had the same problem a while ago. You can upgrade IPython using the following command. Hope it resolves your issue.
conda update IPython -n envname
envname is the name of the environment you are trying to work in. Also, you might want to install sudo in the correct environment too if you haven't done already.
conda install -c odsp-test sudo
check all the requirements from the spyder installation page,
https://docs.spyder-ide.org/installation.html
update or install the requirements that are missing. This should work for you.
When I try to import tensorflow in IPython in my Anaconda environment, I get a No module named tensorflow error. However, when I import it after running the python command in the terminal, there are no errors.
I've googled for solutions and so far I have tried the following:
copied the site-packages inside /anaconda2/lib/python2.7/envs/tensorflow/lib/python2.7/site-packages/ to /anaconda2/lib/python2.7/site-packages/
installed ipython in the conda environment with conda install ipython
Anyone know what else I could try?
Refer: Tensorflow and Anaconda on Ubuntu?
I found a link where the tensorflow.whl files were converted to conda packages, so I went ahead and installed it using the command:
conda install -c https://conda.anaconda.org/jjhelmus tensorflow
and it worked, since the $PATH points to anaconda packages, I can import it now!
Source is here