I've installed FLANN with the following command:
brew install flann --enable-python
But I cannot import the module from within Python:
In [4]: import pyflann
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-4-b6d4c333a325> in <module>()
----> 1 import pyflann
ImportError: No module named pyflann
Both flann and pyflann don't work. It would also be nice if I could make this module available within a virtualenv as well.
Help would be much appreciated, thank you.
I got it! I looked in here /usr/local/Cellar/flann/1.8.4/share/flann/python and saw a setup.py file. I enabled my virtualenv and then ran python setup.py install. It now works!
Related
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).
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
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.
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.
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?