Install pyodbc on Colab using pip. I got an error - google-colaboratory

i got an error when installing pyodbc on colab. it works on my local. anything else i should do to resolve this?

You need both apt and pip to install pyodbc
!apt install unixodbc-dev
!pip install pyodbc
Then you can import it.
import pyodbc

Related

Can't import pytorch_lightning on Google colab

I'm using !pip install git+https://github.com/PyTorchLightning/pytorch-lightning
but when I'm importing pytorch_lightning I get the following error:
ImportError: cannot import name '_RequirementAvailable' from 'pytorch_lightning.utilities.imports' (/usr/local/lib/python3.7/dist-packages/pytorch_lightning/utilities/imports.py)
It all worked fine a week ago...
When you install Lightning as
pip install git+https://github.com/PyTorchLightning/pytorch-lightning
you get the latest version in development. It is not an official release. I recommend installing
pip install pytorch-lightning
to get the latest stable release. I suspect this will solve your import error.

Problem importing Cairo after installation in Google-Colaboratory

I successfully installed Cairo on Colab, but I receive the following error when trying to import it.
!apt-get install python3-Cairo
ModuleNotFoundError: No module named 'cairo._cairo'
I also tried to install the following packages beforehand, but the problem is not solved.
!apt-get install -y libgtk-3-dev python-gi-dev libcairo2 Pycairo
You need to install libcairo2-dev first.
!apt install libcairo2-dev
Then you can install pycairo and import it.
!pip install pycairo
import cairo

I am getting an error while installing pytessereact on google colab

!apt-get install pytesseract
On writing above command in google colab, I got this error.
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package pytesseract
Use pip --
!pip install pytesseract
See: https://github.com/madmaze/pytesseract#installation
I suggest you try this out
pip install -v
!pip install pyenchant
!pip install pyenchant

Error installing pandas with pip: Could not find a version that satisfies the requirement numpy==1.9.3

I'm trying to install pandas. When I run: pip install pandas in cmd, I get the following error message: Could not find a version that satisfies the requirement numpy==1.9.3. Not sure how to fix this.
It's likely you have a different version of numpy installed, try upgrade numpy first with:
pip install numpy==1.9.3 --upgrade
then run pip install pandas. Also check this github issue. Maybe your python version is not supported.

pip install tensorflow fails - MAC OSError: [Errno 13]

I am trying to install tensorflow on mac Sierra. When I run pip install tensorflow I get following report.
It works fine for me by using command :
pip3 install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.10.1-py3-none-any.whlrflow-1.10.1-py3-none-any.whl
run sudo pip install tensorflow
The problem appears to be, that you have not got the rights to install tensorflow globally. Therefore, one solution appears to be, that you try to install tensorflow locally using the following command:
pip install tensorflow --user