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?
Related
I want to use TPU to run a PyTorch program on Google Colab, and I installed PyTorch/XLA in my CoLab notebook by using this code:
!pip install cloud-tpu-client==0.10 torch==1.12.0 https://storage.googleapis.com/tpu-pytorch/wheels/tpuvm/torch_xla-1.12-cp38-cp38-linux_x86_64.whl
Then, I successfully imported pytorch by
import torch.
But, when I tried to import torch_xla by using import torch_xla, I got this error message:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-4-7fe098b5b807> in <module>
----> 1 import torch_xla
/usr/local/lib/python3.8/dist-packages/torch_xla/__init__.py in <module>
99 from ._patched_functions import _apply_patches
100 from .version import __version__
--> 101 import _XLAC
102
103
ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /usr/local/lib/python3.8/dist-packages/torch_xla/lib/libxla_computation_client.so)
---------------------------------------------------------------------------
The version of Python is Python 3.8.15.
I thought that perhaps downgrading the Python version to Python 3.7 might help, but is there a solution that does not need to downgrade the Python version?
https://storage.googleapis.com/tpu-pytorch/wheels/tpuvm/torch_xla-1.12-cp38-cp38-linux_x86_64.whl doesn't look like the correct colab wheel.
If you plan to run the colab on TPU, can you try the command !pip install cloud-tpu-client==0.10 torch==1.13.0 https://storage.googleapis.com/tpu-pytorch/wheels/colab/torch_xla-1.13-cp38-cp38-linux_x86_64.whl instead?
I have installed the library using command pip install --upgrade tableau-api-lib
It is also installed on my system
Package Version
------------------ ---------
tableau-api-lib 0.1.45
python --version
Python 3.10.6
But when I am running in on Jupyter, I am getting error that
ModuleNotFoundError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_5860/1301965758.py in <module>
1 import io
----> 2 from tableau_api_lib import TableauServerConnection
3 from tableau_api_lib.utils.querying import get_views_dataframe, get_view_data_dataframe
ModuleNotFoundError: No module named 'tableau_api_lib'
I have tried restarting the system and kernel.
I used the virtual environment to run the script. Installed the library in virtual environment and it worked like a charm.
i'm using anaconda environment, i've installed SpaCy lib, when i import this lib in terminal (spacy) it works with no error.
but when i use jupyter notebook in the same environemnt does'nt work, and shows this error:
***---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-76a01d9c502b> in <module>
----> 1 import spacy
ModuleNotFoundError: No module named 'spacy'***
can anyone help with this error!
I imported 'pyaudio' library in Google Colab, but ModuleNotFoundError occurs.
However, it worked just a week ago... :( But does not Now..
I tried to re-install pyaudio in colab with the next codes but same errors occur.
!sudo apt-get install python-pyaudio
!pip install pyaudio
How can I do?
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-13-627d880c2452> in <module>()
4 from pydub.effects import normalize
5
----> 6 import pyaudio
7 import scipy.signal
8
ModuleNotFoundError: No module named 'pyaudio'
---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------
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.