[PYTHON] install diagrams in wsl

Overview

I couldn't install diagrams quickly with wsl, so I summarized the procedure.


$ sudo apt install graphviz
$ pip install diagrams

If you can install it above, there is no problem, but I get an error and I'm not sure what it is. In such a case, it is the procedure that was executed until the installation was completed.

pip install diagram -vvv

$ pip install diagrams
ERROR: Could not find a version that satisfies the requirement diagrams (from versions: none)
…

I wasn't sure what caused the above error, but when I ran it with the "-vvv" option, the message required python3.6 or higher.

pyenv installation

Install pyenv so that you don't have to worry about it in the future. (Please change .bash_profile etc. depending on the environment)

$ git clone https://github.com/pyenv/pyenv.git ~/.pyenv \
 && echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc \
 && echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc \
 && echo 'eval "$(pyenv init -)"' >> ~/.bashrc

$ source ~/.bashrc

pyenv3.8.2 installation

I have installed the latest 3.8.2 at this time (April 22, 2020). However, if the environment is not set up, the build will fail. If you don't know the build environment, execute the following command to prepare the environment. Then install and configure python3.8.2.

$ sudo apt-get install git gcc make openssl libssl-dev libbz2-dev libreadline-dev libsqlite3-dev
$ pyenv install 3.8.2
$ pyenv global 3.8.2

pip install diagrams

Finally, install diagrams. If the installation is successful, the following message will be displayed when you re-execute. Thank you for your hard work.

$ pip install diagrams

$ pip install diagrams
Requirement already satisfied: diagrams in ./.pyenv/versions/3.8.2/lib/python3.8/site-packages (0.8.2)
Requirement already satisfied: graphviz<0.14.0,>=0.13.2 in ./.pyenv/versions/3.8.2/lib/python3.8/site-packages (from diagrams) (0.13.2)
Requirement already satisfied: jinja2<3.0,>=2.10 in ./.pyenv/versions/3.8.2/lib/python3.8/site-packages (from diagrams) (2.11.2)
Requirement already satisfied: MarkupSafe>=0.23 in ./.pyenv/versions/3.8.2/lib/python3.8/site-packages (from jinja2<3.0,>=2.10->diagrams) (1.1.1)

Recommended Posts

install diagrams in wsl
Install python on WSL
Install numpy in Visual Studio 2019
Pip install in proxy environment
List of nodes in diagrams
wsl Install PostgreSQL on Ubuntu 18.04
Install Docker on WSL Ubuntu 18.04
Python install in 2 lines @Windows
Steps to install Ubuntu in VirtualBox
Install scrapy in python anaconda environment
Install tensorflow in Docker (LINUX) (memo)
Install GoLang in goenv of anyenv
Windows10: Install MeCab library in python
install tensorflow in anaconda + python3.5 environment
I can't install scikit-learn in Python
Bring files in Windows to WSL
Install Django in a pipenv virtual environment
Install Pyaudio to play wave in python
In pip install clang: error: unknown argument:'-mno-fused-madd'
Install wsl2 and master linux on windows
Display matplotlib diagrams in a web application
Manage python packages to install in containers
Install rJava on Linux in R3.6 environment.
Install CaboCha in a non-Anaconda environment (Win)
Install the Python module in any directory
[mac] Install R in pyenv + Jupyter-Lab environment
(Not yet) Don't put Ubuntu 20.04 in WSL1
Install the package in an offline environment
Steps to install CentOS 8.1 in Virtual Box
Why can't I install matplotlib in python! !!