{"id":3172,"date":"2024-01-22T12:12:09","date_gmt":"2024-01-22T18:12:09","guid":{"rendered":"http:\/\/www.ishygddt.xyz\/~blog\/?p=3172"},"modified":"2024-01-26T10:37:39","modified_gmt":"2024-01-26T16:37:39","slug":"twine-nh3-rust","status":"publish","type":"post","link":"http:\/\/www.ishygddt.xyz\/~blog\/2024\/01\/twine-nh3-rust","title":{"rendered":"Can't install Twine on PyPy due to nh3 \"Rust\" problem"},"content":{"rendered":"<p>Quick fix, just run these commands if Twine refuses to install on PyPy on Windows due to a weird error about the nh3 package needing the non-PyPI dependency, Rust:<\/p>\n<pre><code class=\"\" data-line=\"\">REM on Windows\npip install -v &quot;readme-renderer &lt; 42.0&quot;  &amp; REM https:\/\/github.com\/pypa\/twine\/issues\/1015\npip install twine<\/code><\/pre>\n<pre><code class=\"lang-shell\" data-line=\"\"># on Mac and Linux\npip install -v &quot;readme-renderer &lt; 42.0&quot;  # https:\/\/github.com\/pypa\/twine\/issues\/1015\npip install twine<\/code><\/pre>\n<p>This won't pollute your registry or any other folders than the current one with an installation of rust or rustc or cargo or the rust updater or the rust updater installer or whatever other weird litter the kids are advocating for your system these days<\/p>\n<p><em>Alternatively<\/em>, if you really need some feature of <code class=\"lang-toml\" data-line=\"\">readme-renderer &gt;= 42.0<\/code>, here's a less simple workaround that provides all the same guarantees as the previous one:<\/p>\n<pre><code class=\"\" data-line=\"\">REM on Windows\nREM https:\/\/github.com\/pypa\/twine\/issues\/1015\nREM https:\/\/github.com\/pypa\/readme_renderer\/blob\/42.0\/pyproject.toml#L10\nREM https:\/\/github.com\/messense\/nh3\/blob\/v0.2.15\/.github\/workflows\/CI.yml#L58\nREM https:\/\/github.com\/rust-lang\/rust-forge\/issues\/225\nREM https:\/\/github.com\/rust-lang\/rust\/issues\/116028\nREM https:\/\/github.com\/rust-lang\/cargo\/issues\/1734\n\nset \/p=&quot;Download TGZ from https:\/\/forge.rust-lang.org\/infra\/other-installation-methods.html#standalone-installers then press Enter&quot;\nmsiexec \/a &quot;%USERPROFILE%\\Downloads\\rust-1.75.0-x86_64-pc-windows-msvc.msi&quot; \/qb TARGETDIR=&quot;%cd%&quot;\ncmd \/C set ^&quot;PATH=%cd%\\Rust\\bin;%PATH%^&quot; ^&amp; set ^&quot;CARGO_TARGET_DIR=%cd%\\Rust\\.cargo^&quot; ^&amp; python -m pip install -v twine<\/code><\/pre>\n<pre><code class=\"\" data-line=\"\"># on Linux\n# https:\/\/github.com\/pypa\/twine\/issues\/1015\n# https:\/\/github.com\/pypa\/readme_renderer\/blob\/42.0\/pyproject.toml#L10\n# https:\/\/github.com\/messense\/nh3\/blob\/v0.2.15\/.github\/workflows\/CI.yml#L58\n# https:\/\/github.com\/rust-lang\/rust-forge\/issues\/225\n# https:\/\/github.com\/rust-lang\/rust\/issues\/116028\n# https:\/\/github.com\/rust-lang\/cargo\/issues\/1734\n\nread -p &quot;Download MSI from https:\/\/forge.rust-lang.org\/infra\/other-installation-methods.html#standalone-installers then press Enter&quot;\ntar x -zf &quot;$HOME\/Downloads\/rust-1.75.0-x86_64-unknown-linux-gnu.tar.gz&quot;\nPATH=&quot;$PWD\/rust-1.75.0-x86_64-unknown-linux-gnu\/rustc\/bin:$PWD\/rust-1.75.0-x86_64-unknown-linux-gnu\/cargo\/bin:$PATH&quot; python -m pip install -v twine<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Quick fix, just run these commands if Twine refuses to install on PyPy on Windows due to a weird error about the nh3 package needing the non-PyPI dependency, Rust: REM on Windows pip install -v &quot;readme-renderer &lt; 42.0&quot; &amp; REM https:\/\/github.com\/pypa\/twine\/issues\/1015 pip install twine # on Mac and Linux pip install -v &quot;readme-renderer &lt; 42.0&quot; &hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,96,97],"tags":[],"class_list":["post-3172","post","type-post","status-publish","format-standard","hentry","category-drafts","category-howto","category-original-content"],"_links":{"self":[{"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/posts\/3172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/comments?post=3172"}],"version-history":[{"count":10,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/posts\/3172\/revisions"}],"predecessor-version":[{"id":3196,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/posts\/3172\/revisions\/3196"}],"wp:attachment":[{"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/media?parent=3172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/categories?post=3172"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ishygddt.xyz\/~blog\/wp-json\/wp\/v2\/tags?post=3172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}