{"id":2359,"date":"2023-09-30T18:43:56","date_gmt":"2023-09-30T09:43:56","guid":{"rendered":"https:\/\/mindtech.jp\/?p=2359"},"modified":"2023-09-30T18:45:18","modified_gmt":"2023-09-30T09:45:18","slug":"post-2359","status":"publish","type":"post","link":"https:\/\/mindtech.jp\/?p=2359","title":{"rendered":"Ubuntu+Anaconda\u306ePython\u74b0\u5883\u306bstreamlit\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u52d5\u304b\u306a\u304b\u3063\u305f\u5834\u5408\u306e\u5bfe\u5fdc"},"content":{"rendered":"\n<p>WSL2\u306eUbuntu\u306e\u74b0\u5883\u306ePython\u3092\u4f7f\u3063\u3066\u3001streamlit\u3068openai\u306eAPI\u3092\u5229\u7528\u3057\u3066\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u3092\u4f5c\u308d\u3046\u3068\u3057\u3066\u304a\u3063\u305f\u306e\u3067\u3059\u304c\u3001streamlit\u306e\u8d77\u52d5\u6642\u306b\u30a8\u30e9\u30fc\u304c\u3067\u307e\u3059\u3002\u4f8b\u3048\u3070\u3053\u3093\u306a\u611f\u3058<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(chat) tomi@ubuntu:~\/projects\/chatgpt$ streamlit run temp.py\nTraceback (most recent call last):\nFile \"\/home\/tomi\/anaconda3\/envs\/chat\/bin\/streamlit\", line 7, in\nfrom streamlit.cli import main\nModuleNotFoundError: No module named 'streamlit.cli'<\/code><\/pre>\n\n\n\n<p>\u3061\u306a\u307f\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306f conda-forge\u7d4c\u7531\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>conda install -c openai\nconda install -c streamlit<\/code><\/pre>\n\n\n\n<p>\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u304c\u3088\u304f\u5206\u304b\u3089\u305a\u3001conda upgrade streamlit\u3000\u306a\u3069\u3092\u8a66\u3057\u305f\u306e\u3067\u3059\u304c\u89e3\u6d88\u305b\u305a\u3002\u30b0\u30b0\u3063\u3066\u3082\u300c\u5b9f\u884c\u30d1\u30b9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u300d\u306a\u3069\u304c\u30d2\u30c3\u30c8\u3057\u307e\u3059\u304c\u3001\u30a8\u30e9\u30fc\u306e\u5185\u5bb9\u304b\u3089\u898b\u3066\u3082\u305d\u3093\u306a\u3053\u3068\u306f\u306a\u3055\u305d\u3046\u3002<\/p>\n\n\n\n<p>\u6700\u7d42\u7684\u306b\u306fstackoverflow\u306b\u3066\u30d2\u30f3\u30c8\u3092\u767a\u898b\u3002<br><a href=\"https:\/\/stackoverflow.com\/questions\/73514548\/no-module-named-streamlit-cli\">python &#8211; No module named &#8216;streamlit.cli&#8217; &#8211; Stack Overflow<\/a><\/p>\n\n\n\n<p>\u7d50\u5c40\u306e\u3068\u3053\u308d\u3001streamlit\u306e\u5b9f\u884c\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u304d\u63db\u3048\u3066\u5bfe\u5fdc\u3067\u304d\u307e\u3057\u305f\u3002\u66f8\u304d\u63db\u3048\u308b\u5834\u6240\u306f\uff11\u884c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u30aa\u30ea\u30b8\u30ca\u30eb\nfrom streamlit.cli import main\n\u5909\u66f4\u5f8c\nfrom streamlit.web.cli import main<\/code><\/pre>\n\n\n\n<p>\u305d\u3093\u306a\u3053\u3093\u306a\u3067\u3001\u5b9f\u884c\u3057\u3066\u307f\u308b\u3068\u3046\u307e\u304f\u8d77\u52d5\uff01<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(chat) tomi@ubuntu:~\/projects\/chatgpt$ streamlit run temp.py\n\n  You can now view your Streamlit app in your browser.\n\n  Local URL: http:\/\/localhost:8501\n  Network URL: http:\/\/172.26.92.216:8501<\/code><\/pre>\n\n\n\n<p>\u7d50\u5c40\u306e\u3068\u3053\u308d\u3001\u3042\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306e streamlit \u304c\u30d0\u30b0\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u306d\u3002<br>\u3044\u305a\u308c\u66f4\u65b0\u304c\u304b\u304b\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u5bfe\u51e6\u7642\u6cd5\u3068\u3057\u3066\u306f\u3053\u3093\u306a\u611f\u3058\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WSL2\u306eUbuntu\u306e\u74b0\u5883\u306ePython\u3092\u4f7f\u3063\u3066\u3001streamlit\u3068openai\u306eAPI\u3092\u5229\u7528\u3057\u3066\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u3092\u4f5c\u308d\u3046\u3068\u3057\u3066\u304a\u3063\u305f\u306e\u3067\u3059\u304c\u3001streamlit\u306e\u8d77\u52d5\u6642\u306b\u30a8\u30e9\u30fc\u304c\u3067\u307e\u3059\u3002\u4f8b\u3048\u3070\u3053\u3093\u306a\u611f\u3058 \u3061\u306a\u307f\u306b\u30a4\u30f3 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[6],"tags":[159,34,471],"class_list":["post-2359","post","type-post","status-publish","format-standard","hentry","category-6","tag-anaconda","tag-python","tag-streamlit"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4rHn0-C3","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/posts\/2359","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mindtech.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2359"}],"version-history":[{"count":2,"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/posts\/2359\/revisions"}],"predecessor-version":[{"id":2361,"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/posts\/2359\/revisions\/2361"}],"wp:attachment":[{"href":"https:\/\/mindtech.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mindtech.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mindtech.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}