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.
Related
!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
I am unable to do: pip install -U sentence-transformers. I get this message on Anaconda Prompt:
ERROR: Could not find a version that satisfies the requirement torch>=1.0.1 (from sentence-transformers) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch>=1.0.1 (from sentence-transformers)
Can someone help?
I tried to Conda Install pytorch and then installed Sentence Transformer by doing these steps:
conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
pip install -U sentence-transformers
This worked.
Thanks
The other answers weren't working for me even though I saw them working for others on other message boards. This did work for me though.
pip install torch==1.2.0 torchvision==0.4.0 -f https://download.pytorch.org/whl/torch_stable.html
pip install -U sentence-transformers
Maybe try pip3? That might be why it says that it can't find a version.
I cant seem to install the right version of torch and I cant get fast ai libraries working
I try
Python 3.7
pip3 install https://download.pytorch.org/whl/cu100/torch-1.0.1-cp37-cp37m-win_amd64.whl
pip3 install torchvision
Could not find a version that satisfies the requirement torch>=1.1.0 (from torchvision) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
No matching distribution found for torch>=1.1.0 (from torchvision)
I feel like I may of downgraded my gpu when I tried conda install fast ai
and then I tried pip and it couldnt find a file C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\caffe2\python\serialized_test\data\operator_test
I finally got to the point where it said successfully installed six, pillow, and torch but torch is at 0.3 which is incompatiable.
pip3 install https://download.pytorch.org/whl/cu100/torch-1.0.1-cp37-cp37m-win_amd64.whl
pip3 install torchvision
expected to install pytorch or fastai nothing seems to work
You may try installing the course by creating a conda environment provided anaconda is already installed in your windows machine.
conda update conda
conda create -n fastai_conda python=3.6
conda activate fastai_conda
conda install fastai pytorch=1.0.0 -c fastai -c pytorch -c conda-forge
Or for installing CPU version you can use the below commands after the environment is created
conda install -c pytorch pytorch-cpu torchvision
conda install -c fastai fastai
You can check if installation went right with this command
python -m fastai.utils.show_install
You may further need to install ipykernel to use the conda environment in your jupyter notebook.For that activate environment and run the following commands:
conda install nb_conda_kernels
python -m ipykernel install --user --name fastai_v1 --display-name "fastai v1"
conda install ipywidgets
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
CentOS 7 EPEL now includes Python 3.4: yum install python34
However, when I try that, even though Python 3.4 installs successfully, it doesn't appear to install pip. Which is weird, because pip should be included by default with Python 3.4. which pip3 doesn't find anything, nor does which pip.
How do I access pip from the Python 3.4 package in CentOS 7 EPEL release?
The easiest way I've found to install pip3 (for python3.x packages) on CentOS 7 is:
$ sudo yum install python34-setuptools
$ sudo easy_install-3.4 pip
You'll need to have the EPEL repository enabled before hand, of course.
You should now be able to run commands like the following to install packages for python3.x:
$ pip3 install foo
curl https://bootstrap.pypa.io/get-pip.py | python3.4
Or if you don't have curl for some reason:
wget https://bootstrap.pypa.io/get-pip.py
python3.4 get-pip.py
After this you should be able to run
$ pip3
The CentOS 7 yum package for python34 does include the ensurepip module, but for some reason is missing the setuptools and pip files that should be a part of that module. To fix, download the latest wheels from PyPI into the module's _bundled directory (/lib64/python3.4/ensurepip/_bundled/):
setuptools-18.4-py2.py3-none-any.whl
pip-7.1.2-py2.py3-none-any.whl
then edit __init__.py to match the downloaded versions:
_SETUPTOOLS_VERSION = "18.4"
_PIP_VERSION = "7.1.2"
after which python3.4 -m ensurepip works as intended. Ensurepip is invoked automatically every time you create a virtual environment, for example:
pyvenv-3.4 py3
source py3/bin/activate
Hopefully RH will fix the broken Python3.4 yum package so that manual patching isn't needed.
Update: The python34 bug mentioned below has finally been fixed. It is a perfectly fine choice now.
Rather than using broken EPEL python34 packages, you can enable the IUS repo and have it work properly.
pip inside virtual environments
The main python34u and python35u IUS packages include the pyvenv tool (/usr/bin/pyvenv-3.4 or /usr/bin/pyvenv-3.5) that includes bundled wheels of pip and setuptools for bootstrapping virtual environments.
global pip
The python34u-pip and python35u-pip IUS packages include /usr/bin/pip3.4 and /usr/bin/pip3.5 respectively. These work just fine to install packages to the system site-packages directory.
yum install python34-pip
pip3.4 install foo
You will likely need the EPEL repositories installed:
yum install -y epel-release
Update 2019
I tried easy_install at first but it doesn't install packages in a clean and intuitive way. Also when it comes time to remove packages it left a lot of artifacts that needed to be cleaned up.
sudo yum install epel-release
sudo yum install python34-pip
pip install package
Was the solution that worked for me, it installs "pip3" as pip on the system. It also uses standard rpm structure so it clean in its removal. I am not sure what process you would need to take if you want both python2 and python3 package manager on your system.
Below are the steps I followed to install python34 and pip
yum update -y
yum -y install yum-utils
yum -y groupinstall development
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
yum makecache
yum -y install python34u python34u-pip
python3.6 -v
echo "alias python=/usr/bin/python3.4" >> ~/.bash_profile
source ~/.bash_profile
pip3 install --upgrade pip
# if yum install python34u-pip doesnt work, try
curl https://bootstrap.pypa.io/get-pip.py | python
There is a easy way of doing this by just using easy_install (A Setuptools to package python librarie).
Assumption.
Before doing this check whether you have python installed into your Centos machine (at least 2.x).
Steps to install pip.
So lets do install easy_install,
sudo yum install python-setuptools python-setuptools-devel
Now lets do pip with easy_install,
sudo easy_install pip
That's Great. Now you have pip :)
Figure out what version of python3 you have installed:
yum search pip
and then install the best match. Use reqoquery to find name of resulting pip3.e.g
repoquery -l python36u-pip
tells me to use pip3.6 instead of pip3
On CentOS 7, the pip version is pip3.4 and is located here:
/usr/local/bin/pip3.4