How to Install Zipline on Google Colab - installation

!apt-get install libatlas-base-dev python-dev gfortran pkg-config libfreetype6-dev hdf5-tools
!pip install zipline
!pip install zipline ingest
!pip uninstall pandas
!pip install --upgrade pandas==0.23.0
%load_ext zipline
I have following issue:
ValueError: index must be monotonic increasing or decreasing
after adding cuperto suggested (!pip install pandas==0.22.0),
I got this error:
enter image description here
any suggestion?

Trying to run Zipline on Google Colab, I ran into the exact same problem.
I believe the problem comes from the fact that zipline 1.4.1 has requirement pandas<=0.22,>=0.18.1
So I installed an older version of pandas and it worked:
!pip install pandas==0.22.0

Related

Unable to install python graphviz package

When I am trying to install python-graphviz package on IBM Cloud as part of my final assignment for the course - ML with Python, I'm getting the following errors
ERROR: Could not find a version that satisfies the requirement python-graphviz (from versions: none)
ERROR: No matching distribution found for python-graphviz
The command I used is as follows:
!pip install python-graphviz
As per the lab instructions, the following commands to install pydotplus and python-graphviz didn't work.
#!conda install -c conda-forge pydotplus -y
#!conda install -c conda-forge python-graphviz -y
To summarize,
!pip install pydotplus ## THIS IS WORKING.
#!conda install -c conda-forge pydotplus -y ## THIS IS NOT WORKING
!pip install python-graphviz ## THIS IS NOT WORKING
#!conda install -c conda-forge python-graphviz -y ## THIS IS ALSO NOT WORKING.
Please advise me with the right instruction set - whether PIP or CONDA.
Thanks.
Regards,
Vasan S T
Try pip install graphviz after upgrading pip.

Colab cannot find an installed a package

I'm trying to install a package called fenics in Google Colab.
I tried both:
!pip install fenics
>> fenics in /usr/local/lib/python3.6/dist-packages (2019.1.0)
and
!apt-get install fenics
Then a simple import fenics raises ModuleNotFoundError. Restarting the runtime doesn't solve the problem. Any clues?
Following the instruction
!apt-get install software-properties-common
!add-apt-repository ppa:fenics-packages/fenics
!apt-get update
!apt-get install --no-install-recommends fenics
Then you can import fenics. Here's the notebook I tested.

Problem with tensorflow while downloading rasa_core

I’m trying to update the rasa bot source code from a friend of mine but I had a problem when trying to download rasa_core:
(cha_env) C:\Users\antoi\Documents\Programming\Nathalie\Chatbot_RASA_room_reservation>pip install rasa_core
Collecting rasa_core
...
Collecting tensorflow==1.10.0 (from rasa_core)
Could not find a version that satisfies the requirement tensorflow==1.10.0 (from rasa_core) (from versions: )
No matching distribution found for tensorflow==1.10.0 (from rasa_core)
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Do you have any idea ? Is it because of the requirements ?
I tried to install tensorflow according to this answer :
python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl
But I still have the same issue.
I remember seeing this issue when my colleague was installing it rasa_core. Try installing tensorflow separately then continue with rasa_core installation. It should solve the problem
pip install tensorflow
If you get No matching distribution found for tensorflow error try following:
Note: This works for 64 bit Windows for tensorflow version 1.12.0. For all the variants of tensorflow distribution please check https://storage.googleapis.com/tensorflow/
python -m pip install --upgrade https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-1.12.0-rc2.zip

Installing faiss on Google Colaboratory

I try to follow instruction on the MUSE project.
They require PyTorch and Faiss. PyTorch is easy to install. But I found problem with installing Faiss.
The instruction on MUSE tell me to use
conda install faiss-cpu -c pytorch
But Google Colab doesn't support conda (When I tried !pip install conda, it didn't work)
And Faiss didn't work when I !pip install faiss either.
Is there a way to install Faiss or conda?
Here's how I eventually install faiss.
!wget https://anaconda.org/pytorch/faiss-cpu/1.2.1/download/linux-64/faiss-cpu-1.2.1-py36_cuda9.0.176_1.tar.bz2
!tar xvjf faiss-cpu-1.2.1-py36_cuda9.0.176_1.tar.bz2
!cp -r lib/python3.6/site-packages/* /usr/local/lib/python3.6/dist-packages/
!pip install mkl
Then, I can import faiss with no problem. The warning is that I didn't use GPU. If you want to use GPU, you need to install this instead:
https://anaconda.org/pytorch/faiss-gpu/1.2.1/download/linux-64/faiss-gpu-1.2.1-py36_cuda9.0.176_1.tar.bz2
Update June 2020
As #Kuffner said, you can now use !pip to install it. (I test and simplify it a bit)
For CPU
!apt install libomp-dev
!pip install faiss
For GPU
!pip install faiss-gpu
As of June 2020 the easiest solution for Colab GPU runtime is:
!apt install libomp-dev
!python -m pip install --upgrade faiss faiss-gpu
import faiss
The code comes from here: faiss/issues/890
Try this solution, it should work!
!pip install faiss-cpu --no-cache
Try this way!
install conda
!wget -c -O anaconda.sh 'https://repo.continuum.io/archive/Anaconda3-5.1.0-Linux-x86_64.sh'
!bash anaconda.sh -b
!cd /usr/bin/ && ln -sf /content/anaconda3/bin/conda conda
!cd /content/
install faiss
!yes y | conda install faiss-gpu -c pytorch

How can I install tensorflow on mac using pip?

I have been getting the same error in the picture below for the following commands: pip3 install tensorflow or pip3 install protobuf. How can I solve this problem? Thanks.
Use a virtual environment. Works most efficiently.
pip install virtualenv
virtualenv -p python3 myTestEnv
source myTestEnv/bin/activate
pip3 install --upgrade pip3
pip3 install tensorflow

Resources