I'm using python 2.7 on Anaconda, on Ubuntu 16.04, installed in a virtual machine with VMware Player on Windows 10.
When running the following code, I get the following error:
>>> import networkx as nx
>>> G = nx.complete_graph(4)
>>> pos = nx.nx_pydot.graphviz_layout(G)
Fontconfig error: Cannot load default config file
I have tried setting the path as suggested here, both in the root and on the conda environment, I have tried to reinstall fontconfig both in the root and on the conda environment, and I have also tried the answer suggested here, and I have exited the console, and restart the machine several times, and I still get the same error.
I will very much appreciate any help to solve this problem.
The following fixed it for me:
export FONTCONFIG_FILE=$CONDA_PREFIX/etc/fonts/fonts.conf
export FONTCONFIG_PATH=$CONDA_PREFIX/etc/fonts/
EDIT: Can you try it again? There were two '\' too much.
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