Importgraph lab hello world error - python

After installing GraphLab in my PC which is running Ubuntu 14.04, I have just encountered the following error in my first hello world program:
import graphlab
The Error:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-5-784beace7f26> in <module>()
----> 1 import graphlab
ImportError: No module named graphlab
What is the reason for this and how the error could be solved?

The usual reason for this type of error is that your package is installed somewhere other than on the default path that Python is searching. Check
print sys.path
to see whether the location of your graphlab module is present. I'm guessing that it isn't, in which case you will need to append it:
sys.path.append('path/to/graphlab')
If that works you can then add that location to your PYTHONPATH for future use.

Did you install graphlab on your computer or did you install the graphlab python module? You might need to install the graphlab module if you only installed it on your computer.
Looks like this link here has the information that you need to install graphlab with pip.

Related

error then import pytorch-lightning, azure notebook

i am use microsoft azure (for students) ML servise. Then i work with notebook i can not import pytorch-lightning libary.
!pip install pytorch-lightning==0.9.0
import pytorch_lightning as pl
Here i have error:
ModuleNotFoundError Traceback (most recent call last)
Input In [1], in <module>
----> 2 import pytorch_lightning as pl
ModuleNotFoundError: No module named 'pytorch_lightning'
This is unbearably weird. someone faced such a problem?
This is rather strange but could be related to that your installation is in another location, so let's:
try where is PL installed with find -name "lightning"
also, check what is the loaded package locations python -c "import sys; print(sys.path)"
I guess that the problem will be in What's the difference between dist-packages and site-packages?
I resolved this problem by installing PyTorch-lightning in the kernel instead of the machine. It all boils down to installing with %conda magic instead of !conda magic (or same thing for %pip magic instead of !pip magic).

Jupyter notebook error ModuleNotFoundError: No module named 'datascience'

Good evening,
I am trying to import datascience module at my Jupyter notebook, but the notebook keeps showing error called
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-10-6f3a305c96af> in <module>()
----> 1 from datascience import *
ModuleNotFoundError: No module named 'datascience'
although I have done
pip install --user datascience
Could anyone solve this problem for me?
Thank you in advance
first, check whether you have installed datascience package in to the same environment.
use pip freeze to list installed packages.
if it's installed correctly, then try this.
import datascience as dt
then you can access ant function in datascience package.
`dt.function()`
Perhaps these links can help you :
link, link 2 and link 3
First, activate your environment if you have it.
Second, check your project path.
Third, try to install your package one more time.
Fourth, use freezing to check if a module is installed.
Five, check if the import is well done.

"No module named 'stem'" in Python3 on macOS

Apologies for the noob question.
I am trying to run a script which uses the stem module. However, whenever I run it, I get the warning "ModuleNotFoundError: No module named 'stem'"
Even when I use Python3 in terminal this issues occurs from simply trying:
In [1]: import stem
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-e9a7ebd02e09> in <module>()
----> 1 import stem
ModuleNotFoundError: No module named 'stem'
Why is this happening?
I am using macOS 10.12.6. I have also imported stem through terminal.
Run It to solve the issue:
pip3 install stemming
Try below code
pip3 install stem
I had similar issue using python3.8,
stem package was installed, had Ubuntu 20.04 system, but still kept on getting the "No module named 'stem'" error.
until I ran into stem documentation then figured I should run:
sudo apt-get install python3-stem

How to add a local module to my anaconda path

I have a module in my local directory ~/mglearn. How can I add it to my anaconda search path? I did the following but it doesn't work:
In [9]: sys.path.append("/home/abigail/mglearn")
In [10]: import mglearn
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-10-e19748f92cd9> in <module>()
----> 1 import mglearn
ImportError: No module named 'mglearn'
I believe you are referencing the mglearn library from the book Introduction to Machine Learning with Python. If that’s the case the library is available regularly through pip. You can use pip install mglean to add it to your anaconda search path.

ImportError: No module named caffe

I am trying to run Google Research's DeepDream code on a mac running OSx 10.9.5.
There are a few dependencies that I had to install. I am using the Anaconda distribution of python and I made sure that I have all the packages required.
The hardest thing was to install Caffe. I have ATLAS installed using fink. Then I have compiled caffe and pycaffe. When I ran 'make runtest' all tests passed. I also ran 'make distribute'.
When I run the notebook released from Google, I get the following error:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-8200bcb1df23> in <module>()
7 from google.protobuf import text_format
8
----> 9 import caffe
10
11 def showarray(a, fmt='jpeg'):
ImportError: No module named caffe
How can this be? What can I try to do to fix it?

Categories