티스토리 뷰
이것저것 자료/Python
[python library] matplotlib.pyplot에서 TypeError: Couldn't find foreign struct converter for 'cairo.Context' Error
happy_dohee 2021. 8. 10. 12:11(이 글은 Ubuntu 18.04를 기준으로 작성되었습니다)
Error
import matplotlib.pyplot as plt
plt.plot([1,2,3],[3,4,5])
plt.show()
를 실행시켰을 때, 빈 화면만 뜨고 error message로
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
를 띄워주었다.
Solution
sudo apt-get install python-gi-cairo
sudo apt-get install python3-gi-cairo
자신의 python version에 맞게, python-gi-cairo를 설치해주면 된다.
'이것저것 자료 > Python' 카테고리의 다른 글
[python library] tensorboard 설치하기 (0) | 2021.08.10 |
---|---|
[python library] matplotlib 설치 (0) | 2021.08.10 |
[python library] opencv 설치하기 (0) | 2021.08.09 |
[python] Tensorflow tf.math.argmax 함수 (0) | 2021.08.04 |
[python] Tensorflow tf.math.equal 함수 (0) | 2021.08.04 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- error
- dfs
- 최소신장트리
- pytorch
- 다익스트라
- CUDA
- version
- 동적프로그래밍
- PIP
- BFS
- matplotlib
- Python
- 코딩테스트
- 백준
- docker
- 프로그래머스
- notfound
- 백트래킹
- 설치하기
- shellscript
- LGSVL
- torchscript
- torch
- numpy
- 이것이코딩테스트다
- 파이썬
- n과m
- 설치
- tensorflow
- 카카오
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
글 보관함