IPython Notebook showing `ImportError` - linux

I am using Ubuntu 15.04 and I just installed IPython 4.0.
Now, when I type ipython notebook in the terminal, I get the following error message:
ImportError: No module named notebook.notebookapp
I have read related questions on this site but I could not solve this situation.
Since, I have no working knowledge of IPython,so I could really use some advice to fix this.

Try pip install "ipython[notebook]"
and take a look here:
http://ipython.org/install.html#i-already-have-python.
This should install all the dependencies and get you up and running.

Related

Problems with Fortran-magic and other jupyter lab extensions

I am originally a Fortran programmer, if anything. Last year I begun learning python and now I wanted to use fortranmagic to have a wrapper of f2py, but it is not working. Let me describe the steps I took and the resulting error messages, hoping for some help. I am working with Ubuntu 22.04
I begun by creating an environment conda create -n lf and activating the environment
I installed I few libraries I might need
conda install numpy scipy matplotlib jupyter nodejs
Following the instructions of the Fortran-magic developer GitHub I run pip install -U fortran-magic
Everything installs fine, but when I create a notebook and execute
%load_ext fortranmagic
I get the following error ModuleNotFoundError: No module named 'fortranmagic'
4. I finally try to install the extensions from jupyter, as it is also suggested in the developer GitHub
%install_ext https://raw.github.com/mgaitan/fortran_magic/master/fortranmagic.py
Yet only to receive the following error UsageError: Line magic function %install_ext not found.
I hope you can help

ImportError cannot import 'langauge' from 'google.cloud' (unknown location)

I'm trying to incorporate google-cloud-language to use sentiment analysis. I followed the guide on the google documentation website, like so:
from google.cloud import language
When I run the script I receive the following error:
ImportError cannot import 'langauge' from 'google.cloud' (unknown location)
I try to run the script like so:
python3 scriptName.py
I've installed google-cloud-language like so:
pip3 install gooogle-cloud-language
pip install google-cloud-language
I've done that in a virtual environment and outside a virtual environment.
Nothing works. How do I properly set up my script to successfully import the NLP module from google cloud?
Happy to see that you resolved your issue. However, I would like to point some things out:
In the error that you posted in the description there is a typo. It looked for a module named langauge instead of language.
pip3 install gooogle-cloud-language and python3 -m pip install google-cloud-language should be equivalent but that may not always be the case. For example when they are not in the same path. Check this answer for more details.
As I was writing this question and going through other similar questions on stackoverflow, I found another command to try and it seems to have worked.
python3 -m pip install google-cloud-language
I did this inside my virtualenv. It could also work outside of one, but because I got it working, I did not test the outside virtualenv case.

Why am I getting ModuleNotFoundError: No module named 'dpkt'?

When I run
import dpkt
It gives
ModuleNotFoundError: No module named 'dpkt'
But I already installed dpkt.
install dpkt cmd
Does anyone know how I can fix this?
I am using window10, python3.
I had the same issue today. I found out that when I installing the dpkt module, it was getting installed onto an environment different than the one I was using in pyCharm.
I found the answer to this post very helpful to explain my issue: https://stackoverflow.com/a/52608375/2411380
I fixed my issue by using the terminal inside pyCharm to install dpkt, then it worked.
I also found a suggestion to use all packages installed in conda inside pyCharm: https://stackoverflow.com/a/49097897/2411380

How to solve this ModuleNotFoundError: No module named '_sqlite3' in docker-debian

While trying to run scrapy spider in docker-debian every time I get an error:
File "/usr/local/lib/python3.6/site-packages/scrapy/crawler.py", line 82, in
crawl
yield self.engine.open_spider(self.spider, start_requests)
builtins.ModuleNotFoundError: No module named '_sqlite3'
python version 3.6.3
scrapy 1.6.0
tried instruction from this post - ImportError: No module named '_sqlite3' in python3.3
still see this error.
when type sqlite3 command in terminal it shows sqlite3 version and start sqlite terminal.
SQLite version 3.16.2 2017-01-06
when type python and write next command in terminal:
import sqlite3
get this error:
ModuleNotFoundError: No module named '_sqlite3'
is there any way to solve this problem? looks like there is some misconfiguration but I can't find where it's
I have the same error with sqlite3 while I was trying to start my crawler using scrapy crawl my-crawler, after some searches and tried out different solutions, I found this answer useful to my error. Just remember that you need to download your specific python version, mine was 3.8.1 and it worked thanks to their answer. I have already install sqlite3 using sudo apt install libsqlite3-dev. Hope it works in your case, too. So, at first install it then reconfigure your python via instructions in the link.
I had same problem in centos, I just fix it. I install multiple python version in pyenv, so I switch the python version from 3.6 to 3.4.1, then problem solved.Maybe the problem was caused by pyenv,or it's python version's problem. If you don't have pyenv,maybe you need to reinstall python,or install a diffrent version of python.Hope be helpful.

PyCharm 2017.1, No module named 'kivy'

I could use (troubleshooting)help with getting Kivy imported in PyCharm. I am using:
Anaconda with Python 3 on 64-bit Windows 10 Pro
PyCharm 2017.1
Packages: NumPy, SciPy, BeautifulSoup, Pandas, Scrapy, Pattern, NetworkX, NLTK, scikit-learn, Selenium
I have installed Kivy following the instructions at https://kivy.org/docs/installation/installation-windows.html#installation
As evident from the screen shot, no errors occurred.
Still, when I run "import kivy" from PyCharm I get "ModuleNotFoundError: No module named 'kivy'".
I ran through the installation with someone on the #kivy channel and was assured that kivy is successfully installed.
When I pass import kivy; print(kivy.file) to the interpreter (opened from the CMD command line), I get returned among others:
C:\Users\Steve\Anaconda3\lib\site-packages\kivy\__init__.py
Someone on #kivy suggested I check where PyCharm looks for kivy. How do I figure that out?
I'd appreciate any suggestions to identify the problem / resolve my issue.
Indeed, the installation of Kivy went fine. The problem turned out to be that I had to select the correct (updated) interpreter in the PyCharm settings.

Resources