I have created a different environment for python 3.6.7 32-bit Windows for pyenchant. I have done pip install pyenchant. It was successfully installed. From the command prompt I am able to import the library and also run the example. But when from the same environment, I load the jupyter notebook, and try to import enchant but it gives error : ModuleNotFoundError: No module named 'enchant'. I have wasted a lot of time trying to fix it. Any leads appreciated.
Maintainer have gave up on supporting pyenchant for windows x64 + python3.5 (here).
The only thing you can do there right now is to try to build it yourself. Or maybe wait until someone steps up as a maintainer of that library.
Here is supporting doc issue for the same:
https://github.com/kivy/kivy/issues/5816
Hope it helps.
Related
I'm trying to import a module (batman, for model transits) in jupyter notebook, but its telling me file not found. However when I use the anaconda terminal it imports without issues
This is the error I get from Jupyter Notebook
I've tried reinstalling the package, and I've tried to find a kernel in which it works, but I'm not sure how to go about that
any help is appreciated
Try checking if the module installed properly by running this:
python -c 'import batman; batman.test()'
the batman module also seems to have some issues when installing on windows.
Read this github if you're on windows https://github.com/lkreidberg/batman/issues/26
I've faced the same issue when I use Jupyter in an Anaconda environment. Jupyter Notebook doesn't use the same kernel as Anaconda and I had to specify it manually.
What you can do is comparing the Python version on your Anaconda environment by running this command in your shell:
python --version
And in your Notebook :
import sys
print(sys.version)
Are the versions different ? If so, you must add your Anaconda kernel to your Notebook :
ipython kernel install --name "local-anaconda-env" --user
Then select it in your Notebook.
I was facing the same issue in VSC. What I did is that first I moved the folder(In your case batman) to where VSC had been installed on my laptop. Then I changed the default directory to where VSC was installed on my laptop by running the following code in VSC.
import os
os.chdir("The path where VSC is installed")
Also If you could try to do the code in a python file instead of jupyter notebook
In a cell within your notebook run the following:
%pip install batman-package
Based on here.
And the use of modern pip install magic to handle installing to correct enviornment from inside a notebook, see here.
For others, hitting here and not seeing what they want/expect.
Above is for batman:
Bad-Ass Transit Model cAlculatioN. Associated Github Repo is here, and Python Package Index page.
This is a poor name for a package as at least three developers have claimed this. Also see:
Anaconda install for Batman at conda-forgeBayesian Analysis Tool for Modelling and uncertAinty quaNtification
BATMAN: A Python deployment toolbelt -Batman 0.7.0 at the Python Package Index
Maybe those links will help you.
I have successfully installed npTDMS as seen here:
https://pypi.org/project/npTDMS/
If I try to install with command line using either pip or conda I get a message confirming it is already installed, and I see the package at D:\Users\username\anaconda3\pkgs.
On Spyder I have tried using the PYTHON path manager (in the tools menu) to add both:
D:\Users\username\anaconda3\pkgs\nptdms-1.2.0-pyhd8ed1ab_0
D:\Users\username\anaconda3\pkgs\nptdms-1.2.0-pyhd8ed1ab_0\site-packages\nptdms
As far as I understand this should be enough to use the npTDMS package, however when I try to import I get a ModuleNotFoundError: No module named 'nptdms'.
I'm fairly new to python overall so maybe there is a simple thing I am missing.
This issue comes when there are multiple versions of python or any package you are running at current time. The same issue was with me too when the IDLE was not able to detect the position of where the package is installed.
My suggestion is that uninstall all the versions of python and the module you are using and install them again. Otherwise shift to any other IDLE, in my recommendation - Visual Studio Code.
I installed nltk and seemed to successfully install. But when I try to import it, it says no module named nltk. However, when I try to reinstall it, it says requirement already satisfied. How could that be the case? What can I do to fix this? Thanks!
Additionally if I try to import nltk using python shell (under the same virtual environment that I am running the jupyter notebook from), I get the following:
It seems to be a problem to with the version of Python Jupyter is currently pointing to.
To fix the issue, make sure that both jupyter and pip are running under the same environment. For example, compare which python and pip -V
Also make sure that Python is pointing to the right path:
In your Jupyter Notebook, the output of
import sys
sys.version
should match your python version:
python --version
I'm trying to import spaCy in python (in Windows), but with no luck so far. I installed a virtualenv and with both pip and Anaconda spacy. No problems with installing the package, but when I import spaCy (in a Jupyter Notebook) I get the following error:
[in] import spacy
[out]
[...]
ImportError: DLL load failed: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.
When I run the input again the error messages is as follows:
[...] ImportError: cannot import name util
I'm not sure where to look for a solution. I thinking of a problem with version of other packages or maybe even with the Python version.
I'm currently using Python 2.7.13.
The Two things I needed to do to get spaCy working were:
Install VC2008 Redist (64Bit) I used this link: >
http://www.microsoft.com/download/en/details.aspx?id=20922.
When I installed the model (I used Anaconda) ensure that I ran the Prompt as Administrator
Finally you might want to try using Anaconda.
Works like a charm for me
If you don't want to use anaconda, installing the latest Visual C++ Redistributable (vc_redist.x64.exe) works flawlessly for me.
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
This is a known issue and can be resolved following those links :
https://github.com/explosion/spaCy/issues/1199
&
https://github.com/kbenoit/spacyr/issues/19
In a nutshell, it doesn't work because Visual C++ is not installed, and it uses the msvcrt90.dll that ships with Anaconda.
When i try to use from IPython.display import clear_output, display_html, then i show the error:
(ImportError: No module named IPython)
I am using Python 2.7.13, and im trying to make the game of life from John Conway. I am following this link: http://nbviewer.jupyter.org/url/norvig.com/ipython/Life.ipynb
I have read another questions and answers about it, but any answer works for me. First, this error is showed in command line, and when i try to run this code in a file. Second, this error is direct to IPython, not submodule or something similiar.
Ok, finally i achieved my goal.
I wrote ipython --version but i found, it was not installed.
I tried to install it, with pip. I went to C:\Python27\Scripts, here is pip, you can try in this directory, or add to environment variables.
I tried to install ipython, but i found a error
error: Unable to find vcvarsall.bat
so i installed visual studio c++ 9.0, the version to python 2.7.
pip install ipython
If you scrolled this far you may want to try:
import IPython
as opposed to import Ipython. Notice that 2 letters are capitalized
For Anaconda try,
conda install -c anaconda ipython
Use this code to install the IPython library:
!pip install ipython
import IPython
Well, this works on Google Colab.
This is most likely because ipython is not installed.
You can install it with pip.
pip install ipython
If you are using Anaconda (the full version) ipython comes preinstalled. If you are using Miniconda or if the ipython is deleted for some reason you can re-install with
conda install -c anaconda ipython
If you are using it with jupyter. You might want to register the ipython with a user.
python -m ipykernel install [--user] [--name <machine-readable-name>] [--display-name <"User Friendly Name">]
Reference :
Official Documentation
I have a similar issue, but it appears when I was running the script under sudo. Fast and easiest way was to install IPython under sudo.
sudo pip3 install IPython
I am running a script that uses IPython module, in my terminal. If you are also trying to do something similar, this answer might help you.
!pip3 install IPython
Things to keep in mind:-
'I' and 'P' in IPython are uppercase.
I am running the above command in python 3.7.
you need to import
from IPython.display import Image
initially, I imported
from IPython.display import image
so there is Image not image
For me, the problem (that drove me crazy) is that I actually needed capitalization. The correct import after pip install is:
from IPython.display import display, update_display
etc.