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.
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
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