{"id":21529,"date":"2023-06-21T09:49:19","date_gmt":"2023-06-21T01:49:19","guid":{"rendered":"http:\/\/www.jdcui.com\/?p=21529"},"modified":"2023-06-21T09:51:14","modified_gmt":"2023-06-21T01:51:14","slug":"python-%e5%ae%89%e8%a3%85pyopengl%e7%ac%94%e8%ae%b0","status":"publish","type":"post","link":"http:\/\/www.jdcui.com\/?p=21529","title":{"rendered":"[Python] \u5b89\u88c5PyOpenGL\u7b14\u8bb0"},"content":{"rendered":"<p><span style=\"background-color: #ccffff; color: #ff00ff;\"><strong>\u5b9e\u5e72\u3001\u5b9e\u8df5\u3001\u79ef\u7d2f\u3001\u601d\u8003\u3001\u521b\u65b0\u3002<\/strong><\/span><\/p>\n<p>\u901a\u8fc7Pycharm\u5b89\u88c5PyOpenGL\u7f16\u8bd1\u7a0b\u5e8f\uff0c\u63d0\u793a\u4ee5\u4e0b\u62a5\u9519\uff1a<\/p>\n<p><strong>OpenGL.error.NullFunctionError: Attempt to call an undefined function glutInit, check for bool(glutInit) before calling<\/strong><\/p>\n<p>\u5982\u4e0b\u56fe\u6240\u793a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21530\" src=\"http:\/\/www.jdcui.com\/wp-content\/uploads\/2023\/06\/P0.jpg\" alt=\"\" width=\"1164\" height=\"195\" srcset=\"http:\/\/www.jdcui.com\/wp-content\/uploads\/2023\/06\/P0.jpg 1164w, http:\/\/www.jdcui.com\/wp-content\/uploads\/2023\/06\/P0-768x129.jpg 768w\" sizes=\"auto, (max-width: 1164px) 100vw, 1164px\" \/><\/p>\n<p>\u6700\u540e\u767e\u5ea6\u7814\u7a76\u662f\u56e0\u4e3aPython\u7248\u672c\u3001\u7cfb\u7edf\u7248\u672c\u4e0ePyOpenGL\u4e0d\u517c\u5bb9\u95ee\u9898\u5bfc\u81f4\uff0c\u4e8e\u662f\u4e0b\u8f7d\u5bf9\u5e94\u7684\u79bb\u7ebfPyOpenGL\u7684 whl\uff0c\u901a\u8fc7cmd\u8fdb\u5165\u5bf9\u5e94\u7684python\u4e0b\u627e\u5230pip\uff0c\u7136\u540e\u901a\u8fc7pip\u91cd\u65b0\u5b89\u88c5whl\u6587\u4ef6\u5373\u53ef\u89e3\u51b3\u3002PIP\u4f1a\u5378\u8f7d\u65e7\u7684PyOpenGL\uff0c\u5e76\u63d0\u793a\u65b0\u7248\u5e93\u5b89\u88c5\u6210\u529f\uff0c\u5982\u4e0b\u56fe\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21531\" src=\"http:\/\/www.jdcui.com\/wp-content\/uploads\/2023\/06\/P0-min-1.jpg\" alt=\"\" width=\"1164\" height=\"195\" srcset=\"http:\/\/www.jdcui.com\/wp-content\/uploads\/2023\/06\/P0-min-1.jpg 1164w, http:\/\/www.jdcui.com\/wp-content\/uploads\/2023\/06\/P0-min-1-768x129.jpg 768w\" sizes=\"auto, (max-width: 1164px) 100vw, 1164px\" \/><\/p>\n<p>\u5176\u4e2d\u79bb\u7ebfPyOpenGL\u53ef\u4ee5\u518d\u8fd9\u4e2a\u8fde\u63a5\u4e0b\u8f7d\uff1a<a href=\"https:\/\/www.lfd.uci.edu\/~gohlke\/pythonlibs\/\" target=\"_blank\" rel=\"noopener\"><strong>https:\/\/www.lfd.uci.edu\/~gohlke\/pythonlibs\/<\/strong><\/a><\/p>\n<hr \/>\n<p style=\"text-align: center;\"><strong><div  class=\"thumbs-rating-container\" id=\"thumbs-rating-21529\" data-content-id=\"21529\"><button class=\"thumbs-rating-up thumbs-rating-voted\" onclick=\"thumbs_rating_vote(21529, 1);\">Vote Up +6<\/button> <button class=\"thumbs-rating-down thumbs-rating-voted\" onclick=\"thumbs_rating_vote(21529, 2);\">Vote Down -2<\/button><span class=\"thumbs-rating-already-voted\">You already voted!<\/span><\/div><\/strong><\/p>\n<ul style=\"list-style-type: square;\">\n<li><strong>\u76f8\u5173\u8bdd\u9898 (<span style=\"color: #000080;\"> Related Topics<\/span>)<\/strong><\/li>\n<\/ul>\n<p><strong><span style=\"color: #000000;\">[01].<\/span>\u00a0<a href=\"http:\/\/www.jdcui.com\/?p=6404\" target=\"_blank\" rel=\"noopener\">Python \u51fa\u73b0\u201dinvalid literal for int() with base 10: \\xef\\xbb\\xbf0\u2033 \u9519\u8bef<\/a><\/strong><\/p>\n<p><strong><span style=\"color: #000000;\">[02].<\/span>\u00a0<a href=\"http:\/\/www.jdcui.com\/?p=6408\" target=\"_blank\" rel=\"noopener\">[\u7f16\u7a0b\u7b14\u8bb0] Tuple in Python [Python\u4e2d\u7684\u5143\u7ec4]<\/a><\/strong><\/p>\n<p><strong><span style=\"color: #000000;\">[03].<\/span>\u00a0<a title=\"[Python][\u7f16\u7a0b][\u7b14\u8bb0] Python\u6d77\u9f9f\u7ed8\u56fe \u2014\u2014 \u591a\u8fb9\u5f62 Polygon\" href=\"http:\/\/www.jdcui.com\/?p=18283\" target=\"_blank\" rel=\"noopener\">[Python][\u7f16\u7a0b][\u7b14\u8bb0] Python\u6d77\u9f9f\u7ed8\u56fe \u2014\u2014 \u591a\u8fb9\u5f62 Polygon<\/a><\/strong><\/p>\n<p><strong><span style=\"color: #000000;\">[04].<\/span>\u00a0<a title=\"[Python][\u7f16\u7a0b][\u7b14\u8bb0] Python\u7b26\u53f7\u8ba1\u7b97\u2014\u2014\u6c42\u504f\u5fae\u5206\u65b9\u7a0b (Python symbolic computation \u2014 solving partial differential equations)\" href=\"http:\/\/www.jdcui.com\/?p=18305\" target=\"_blank\" rel=\"noopener\">[Python][\u7f16\u7a0b][\u7b14\u8bb0] Python\u7b26\u53f7\u8ba1\u7b97\u2014\u2014\u6c42\u504f\u5fae\u5206\u65b9\u7a0b (Python symbolic computation \u2014 solving partial differential equations)<\/a><\/strong><\/p>\n<p><strong><span style=\"color: #000000;\">[05].<\/span>\u00a0<a title=\"[Python] \u5b89\u88c5PyOpenGL\u7b14\u8bb0\" href=\"http:\/\/www.jdcui.com\/?p=21529\" target=\"_blank\" rel=\"noopener\">[Python] \u5b89\u88c5PyOpenGL\u7b14\u8bb0<\/a><\/strong><\/p>\n<ul style=\"list-style-type: square;\">\n<li style=\"text-align: left;\"><strong>\u5fae\u4fe1\u516c\u4f17\u53f7\u00a0(<span style=\"color: #000080;\">\u00a0Wechat\u00a0Subscription<\/span>)<\/strong><\/li>\n<\/ul>\n<p><a href=\"http:\/\/www.jdcui.com\/wp-content\/uploads\/2017\/01\/QRCODE.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3636\" src=\"http:\/\/www.jdcui.com\/wp-content\/uploads\/2017\/01\/QRCODE.jpg\" alt=\"WeChat_QRCode\" width=\"250\" height=\"255\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><strong>\u6b22\u8fce\u5173\u6ce8\u00a0\u201c<span style=\"color: #ff00ff;\">\u7ed3\u6784\u4e4b\u65c5<\/span>\u201d\u00a0\u5fae\u4fe1\u516c\u4f17\u53f7<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b9e\u5e72\u3001\u5b9e\u8df5\u3001\u79ef\u7d2f\u3001\u601d\u8003\u3001\u521b\u65b0\u3002 \u901a\u8fc7Pycharm\u5b89\u88c5PyOpenGL\u7f16\u8bd1\u7a0b\u5e8f\uff0c\u63d0\u793a\u4ee5\u4e0b\u62a5\u9519\uff1a OpenGL.error.NullFunctionError: Attempt to call an undefined function glutInit, check for bool(glutInit) before calling \u5982\u4e0b\u56fe\u6240\u793a \u6700\u540e\u767e\u5ea6\u7814\u7a76\u662f\u56e0\u4e3aPython\u7248\u672c\u3001\u7cfb\u7edf\u7248\u672c\u4e0ePyOpenGL\u4e0d\u517c\u5bb9\u95ee\u9898\u5bfc\u81f4\uff0c\u4e8e\u662f\u4e0b\u8f7d\u5bf9\u5e94\u7684\u79bb\u7ebfPyOpenGL\u7684 whl\uff0c\u901a\u8fc7cmd\u8fdb\u5165\u5bf9\u5e94\u7684python\u4e0b\u627e\u5230pip\uff0c\u7136\u540e\u901a\u8fc7pip\u91cd\u65b0\u5b89\u88c5whl\u6587\u4ef6\u5373\u53ef\u89e3\u51b3\u3002PIP\u4f1a\u5378\u8f7d\u65e7\u7684PyOpenGL\uff0c\u5e76\u63d0\u793a\u65b0\u7248\u5e93\u5b89\u88c5\u6210\u529f\uff0c\u5982\u4e0b\u56fe\u3002 \u5176\u4e2d\u79bb\u7ebfPyOpenGL\u53ef\u4ee5\u518d\u8fd9\u4e2a\u8fde\u63a5\u4e0b\u8f7d\uff1ahttps:\/\/www.lfd.uci.edu\/~gohlke\/pythonlibs\/ \u76f8\u5173\u8bdd\u9898 ( Related Topics) [01].\u00a0Python \u51fa\u73b0\u201dinvalid literal for int() with base &#8230;<\/p>\n","protected":false},"author":1,"featured_media":21531,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[997],"tags":[3951,998],"class_list":["post-21529","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-pyopengl","tag-python"],"aioseo_notices":[],"views":3678,"_links":{"self":[{"href":"http:\/\/www.jdcui.com\/index.php?rest_route=\/wp\/v2\/posts\/21529","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.jdcui.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jdcui.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jdcui.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jdcui.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=21529"}],"version-history":[{"count":0,"href":"http:\/\/www.jdcui.com\/index.php?rest_route=\/wp\/v2\/posts\/21529\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.jdcui.com\/index.php?rest_route=\/wp\/v2\/media\/21531"}],"wp:attachment":[{"href":"http:\/\/www.jdcui.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21529"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jdcui.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21529"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jdcui.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}