I'm new with Python so having a bit of trouble. Also on Ubuntu. Anyway, when I install Kivy the normal way (Kivy repositories), it installs the package somewhere else on my system and not with the rest of the packages in the Anaconda3 folder. How can I install Kivy within the Anaconda3 folder so that I can use it with the rest of the packages in Anaconda?
I found a couple of Kivy packages when I searched the Anaconda packages with
anaconda search -t conda kivy
but I am not sure which one to use and if they are the same as the official Kivy packages? I guess I'm just looking for an explanation.
Since you are using anaconda3, you could install kivy on your own virtual environment.
To install kivy on a virtual env, you have to install some necessary packages. Run the command:
sudo apt-get install -y \
python-pip \
build-essential \
git \
python \
python-dev \
ffmpeg \
libsdl2-dev \
libsdl2-image-dev \
libsdl2-mixer-dev \
libsdl2-ttf-dev \
libportmidi-dev \
libswscale-dev \
libavformat-dev \
libavcodec-dev \
zlib1g-dev
Creating a env for kivy in conda, run this command:
conda create kivyinstall
kivyinstall is just a name for the env.
run the below command to activate the env:
source activate kivyinstall
Now make sure Pip, Virtualenv and Setuptools are fully updated.
you can use conda install or pip install once you are in the env.
sudo pip install --upgrade pip virtualenv setuptools
Install Cpython version 0.23
pip install Cython==0.23
now install the stable version of kivy in your env:
pip install kivy
Some linux version throws some error when installing ffmpeg package, in place of ffmpeg you could use "libav-tools"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With