fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

8.7K
active users

#virtualenv

1 post1 participant0 posts today
AskUbuntu<p>Setup virtual enviroment for python 2.7.18 and python 3 same Ubuntu 24.04 <a href="https://ubuntu.social/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://ubuntu.social/tags/python3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python3</span></a> <a href="https://ubuntu.social/tags/virtualenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>virtualenv</span></a></p><p><a href="https://askubuntu.com/q/1554321/612" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">askubuntu.com/q/1554321/612</span><span class="invisible"></span></a></p>
Space Hobo<p>I kind of irrationally <a href="https://teh.entar.net/tags/CodeGolf" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CodeGolf</span></a> my <a href="https://teh.entar.net/tags/Makefile" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Makefile</span></a> rules, but sometimes I sit down to straighten out something awkward that bugged me for years, and get kind of mad when I seem to have been the first to actually treat `make` like the tool it is instead of as a broken shell script runner.</p><p>This time it was <a href="https://teh.entar.net/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://teh.entar.net/tags/VirtualEnv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>VirtualEnv</span></a> setup:</p><p>```<br>dep: .venv/bin/pip .venv/lib/*/site-packages/__pycache__</p><p>.venv/lib/%/site-packages/__pycache__: .venv/bin/pip requirements.txt <br> .venv/bin/pip install -Ur requirements.txt </p><p>%/bin/pip: <br> /usr/bin/virtualenv $*<br>```</p><p>(Yeah pretend those are tabs. Yeah that is make's worst wart.)</p><p>I even use `!#.venv/bin/python3` in my scripts and hey presto everything just works everywhere and I can focus on the actual code.</p><p>I'm curious what cases I'm ignoring or missing here. Non-install upgrades may deserve a target perhaps...</p>
mark sta ana<p>Holy fuck! I know I’m late to the game but uv is amazing! A single binary for managing python deps, envs and even python versions! Nice to see it’s been written in rust too! And it’s really fast! <a href="https://docs.astral.sh/uv/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">docs.astral.sh/uv/</span><span class="invisible"></span></a> <a href="https://hachyderm.io/tags/rustlang" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rustlang</span></a> <a href="https://hachyderm.io/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://hachyderm.io/tags/virtualenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>virtualenv</span></a> <a href="https://hachyderm.io/tags/pip" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pip</span></a></p>
hugovangalen 🤖 🕹️ 😼<p>So, I'm tinkering a bit with <a href="https://mastodon.nl/tags/Django" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Django</span></a>, and I wanted to run different Django versions on the /same/ virtual machine. Here `<a href="https://mastodon.nl/tags/virtualenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>virtualenv</span></a>` helps only insomuch that it can seperate dev envs, but it all still shares the `~/.local/lib/python3.10/site-packages` folder.</p><p>(I can't imagine this problem hasn't been solved, but couldn't find anything online.)</p><p>I've resorted to overriding HOME: basically I wrote a `virtualenvenv` script that I source, and then I have the separation I want/need. 🔨</p>
Silmathoron ⁂<p>For some reason, since this morning, the <a href="https://floss.social/tags/pip" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pip</span></a> that I installed via <a href="https://floss.social/tags/pipx" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pipx</span></a> does not work with my other <a href="https://floss.social/tags/virtualenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>virtualenv</span></a> setups anymore (it installs all packages in its own pipx venv instead of the currently active venv).</p><p>Has anyone else encountered this issue? It makes pip virtually (hoho) unusable!</p><p><a href="https://floss.social/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://floss.social/tags/venv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>venv</span></a> <a href="https://floss.social/tags/virtualEnvironment" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>virtualEnvironment</span></a></p>
Alexandre B A Villares 🐍<p>If I had the time and energy I would:</p><ul><li>Make a <a href="https://ciberlandia.pt/tags/ThonnyIDE" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ThonnyIDE</span></a> plug-in to launch <a href="https://ciberlandia.pt/tags/JupyterLab" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>JupyterLab</span></a> from the Thonny GUI interface (using Thonny's <a href="https://ciberlandia.pt/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://ciberlandia.pt/tags/virtualenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>virtualenv</span></a>; </li><li>Write some code to convert <a href="https://ciberlandia.pt/tags/geoDataFrames" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>geoDataFrames</span></a> with a graphic attributes column into <a href="https://ciberlandia.pt/tags/py5" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>py5</span></a> styled shapes;</li><li>Make a search interface to my daily sketch-a-day sketches and fix the RSS.</li></ul>
Mika<p>My final boss in solving this <a href="https://sakurajima.social/tags/Django" rel="nofollow noopener" target="_blank">#Django</a> on <a href="https://sakurajima.social/tags/Alpine" rel="nofollow noopener" target="_blank">#Alpine</a> container thing is getting <a href="https://sakurajima.social/tags/Apache" rel="nofollow noopener" target="_blank">#Apache</a>/<a href="https://sakurajima.social/tags/WSGI" rel="nofollow noopener" target="_blank">#WSGI</a> (mod_wsgi) working. My container runs Apache fine, I suppose, if I don't supply it any site config - but once I do (i.e. in <code>/etc/apache2/conf.d</code>), I'm getting <code>Segmentation fault core dumped</code><span> errors and reboots.<br><br>I'm assuming, as far as my config goes, I need to point </span><code>python-home</code> to where my <a href="https://sakurajima.social/tags/virtualenv" rel="nofollow noopener" target="_blank">#virtualenv</a> is, in addition to <code>python-path</code> to where my Django site/app is (like I do on <a href="https://sakurajima.social/tags/Ubuntu" rel="nofollow noopener" target="_blank">#Ubuntu</a> since that does not enforce the use of venv yet). But that doesn't seem to be enough, so again, in addition to <code>apache2</code>, <code>apache2-mod-wsgi</code>, and <code>apache2-utils</code> (and perhaps <code>musl-dev</code> and <code>gcc</code> in runtime other than just during build), what am I missing?</p>
Hella<p><span class="h-card" translate="no"><a href="https://mas.to/@mckean" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>mckean</span></a></span> <br>I presume you are speaking about the package and project manager uv?</p><p><a href="https://docs.astral.sh/uv/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">docs.astral.sh/uv/</span><span class="invisible"></span></a></p><p>Sounds interesting, thanks for the impetus to take a look at it.</p><p><a href="https://social.tchncs.de/tags/uv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>uv</span></a> <a href="https://social.tchncs.de/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://social.tchncs.de/tags/pip" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pip</span></a> <a href="https://social.tchncs.de/tags/pipx" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pipx</span></a> <a href="https://social.tchncs.de/tags/virtualenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>virtualenv</span></a> <a href="https://social.tchncs.de/tags/astral" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>astral</span></a></p>
atareao 🦀🐍🐋🐧<p>671 - Descubre la herramienta que cambiará como usas Python</p><p><a href="https://mastodon.social/tags/uv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>uv</span></a> es la herramienta perfecta para gestionar proyectos y dependencias de <a href="https://mastodon.social/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> y que viene a sustituir a <a href="https://mastodon.social/tags/pip" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pip</span></a> <a href="https://mastodon.social/tags/poetry" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>poetry</span></a> <a href="https://mastodon.social/tags/pyenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyenv</span></a> <a href="https://mastodon.social/tags/virtualenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>virtualenv</span></a> y otras</p><p>Como ya te he comentado en mas de una ocasión, la llegada de Rust, está suponiendo una auténtica revolución. Los desarrolladores apoyados en Rust se ha</p><p><a href="https://www.youtube.com/watch?v=Jb-9QII_E1Y" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="">youtube.com/watch?v=Jb-9QII_E1Y</span><span class="invisible"></span></a></p><p><a href="https://mastodon.social/tags/atareaoConLinux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>atareaoConLinux</span></a> <a href="https://mastodon.social/tags/podcastesp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>podcastesp</span></a></p>
zartom<p>Troubleshooting Python Virtual Environment Errors on Windows 11. Common causes include PATH variable issues, environment creation inconsistencies, and permission problems. Learn how to resolve these errors and improve your workflow using advanced techniques &amp; tools like virtualenvwrapper or conda. <a href="https://mastodon.social/tags/PythonVirtualEnvironmentError" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PythonVirtualEnvironmentError</span></a> <a href="https://mastodon.social/tags/Windows11" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Windows11</span></a> <a href="https://mastodon.social/tags/Virtualenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Virtualenv</span></a> <a href="https://mastodon.social/tags/Conda" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Conda</span></a> <a href="https://mastodon.social/tags/PythonError" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PythonError</span></a> <a href="https://mastodon.social/tags/Programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Programming</span></a><br><a href="https://tech-champion.com/microsoft-windows/troubleshooting-python-virtual-environment-activation-errors-on-windows-11" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">tech-champion.com/microsoft-wi</span><span class="invisible">ndows/troubleshooting-python-virtual-environment-activation-errors-on-windows-11</span></a></p>
Silmathoron ⁂<p>Hey <a href="https://floss.social/tags/Fedi" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Fedi</span></a>, can you help me with a <a href="https://floss.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> environment pain-point?</p><p>TL;DR : I want global <a href="https://floss.social/tags/virtualenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>virtualenv</span></a> management</p><p>I've been using virtual environments for quite some time, but I might be missing some standard feature because switching env is a pain: I have to be in the right folder (where the venv dir was created) or manually configure a shell script.<br>Is there a tool that can provide me with the equivalent of ``envswitch envname`` regardless of the folder I'm in?</p><p><a href="https://floss.social/tags/venv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>venv</span></a> <a href="https://floss.social/tags/poetry" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>poetry</span></a> <a href="https://floss.social/tags/pipenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pipenv</span></a> <a href="https://floss.social/tags/askFedi" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>askFedi</span></a></p>
Chris<p>quicktipp #97: Sharing Python environments on Windows using portable Python Bundles. </p><p><a href="https://dev.to/treehouse/portable-python-bundles-on-windows-41ac" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">dev.to/treehouse/portable-pyth</span><span class="invisible">on-bundles-on-windows-41ac</span></a> </p><p><a href="https://mastodon.social/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://mastodon.social/tags/pip" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pip</span></a> <a href="https://mastodon.social/tags/ven" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ven</span></a> <a href="https://mastodon.social/tags/virtualenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>virtualenv</span></a> <a href="https://mastodon.social/tags/windows" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>windows</span></a></p>
barefootstache<p>After programming a good 2 months in <a href="https://qoto.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> finally found the tool <a href="https://qoto.org/tags/poetry" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>poetry</span></a> which is quite similar to how <a href="https://qoto.org/tags/nodejs" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>nodejs</span></a> bundles libraries into a directory either locally or globally in the cache directory.</p><p>I have tried the other tools from <a href="https://qoto.org/tags/pyenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyenv</span></a> to <a href="https://qoto.org/tags/venv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>venv</span></a> and/or <a href="https://qoto.org/tags/virtualenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>virtualenv</span></a>. Where I thought they were used to deal with library dependency management only to realize that they are more like <a href="https://qoto.org/tags/nvm" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>nvm</span></a>.</p><p>I did use <a href="https://qoto.org/tags/conda" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>conda</span></a> for some time, though preferred a python only solution. I do realize that poetry won't resolve all issues and might need to look into to containerization later on, though for the time period it looks like a good solution.</p>
Andrea Grandi 🦕<p>Using pyenv and pyenv-virtualenv to install Python and create a virtual environment on MacOS <a href="https://www.andreagrandi.it/posts/install-python-with-pyenv-and-pyenvvirtualenv-create-virtual-environment-with-specific-python-version-macos/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">andreagrandi.it/posts/install-</span><span class="invisible">python-with-pyenv-and-pyenvvirtualenv-create-virtual-environment-with-specific-python-version-macos/</span></a></p><p>I keep referring to this blog post of mine a lot. I'm glad I took some time to note all my process so I can reuse it int he future (and hopefully it's useful for other people too)</p><p><a href="https://mastodon.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://mastodon.social/tags/pyenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyenv</span></a> <a href="https://mastodon.social/tags/virtualenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>virtualenv</span></a></p>
C.<p><span class="h-card" translate="no"><a href="https://kolektiva.social/@forse" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>forse</span></a></span> </p><p>Can you try installing it with `pipx` instead?</p><p>pipx will create a Python virtualenv just for that program, and install all of its dependencies into that virtual environment. It can then run independently of any system-level versions of those same packages that are installed *for the distro-shipped Python tools*.</p><p>The version pipx installs can be upgraded (or left alone) completely independently of OS updates.</p><p><a href="https://mindly.social/tags/pip" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pip</span></a> <a href="https://mindly.social/tags/pipx" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pipx</span></a> <a href="https://mindly.social/tags/virtualenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>virtualenv</span></a></p>
Felix 🇨🇦 🇩🇪 🇺🇦<p>Just tried the <a href="https://mstdn.io/tags/uv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>uv</span></a> <a href="https://mstdn.io/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> management tool. At first I thought: Oh no, not another Python package manager. But this one seems different. It combines all the pip-tools, <a href="https://mstdn.io/tags/pyenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyenv</span></a>, <a href="https://mstdn.io/tags/poetry" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>poetry</span></a>, <a href="https://mstdn.io/tags/virtualenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>virtualenv</span></a>, etc in one. <br>And it's damn fast. This likely will stay with me for a while.</p><p><a href="https://docs.astral.sh/uv/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">docs.astral.sh/uv/</span><span class="invisible"></span></a></p>
Charles Tapley Hoyt<p>I'm trying to use mypy inside tox with tox-uv, but mypy's --install-types flag hardcodes the usage of pip. When you're using tox-uv, pip is no longer installed in the environment because uv does the heavy lifting with `uv pip install` as a faster alternative to `pip install`</p><p>Here's my attempt at making mypy more configurable so it can install types using uv:</p><p><a href="https://github.com/python/mypy/compare/master...cthoyt:mypy:uv-installer" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/python/mypy/compare</span><span class="invisible">/master...cthoyt:mypy:uv-installer</span></a></p><p><a href="https://scholar.social/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://scholar.social/tags/packaging" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>packaging</span></a> <a href="https://scholar.social/tags/typing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>typing</span></a> <a href="https://scholar.social/tags/uv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>uv</span></a> <a href="https://scholar.social/tags/mypy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mypy</span></a> <a href="https://scholar.social/tags/tox" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>tox</span></a> <a href="https://scholar.social/tags/virtualenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>virtualenv</span></a></p>
C.<p><span class="h-card" translate="no"><a href="https://social.meenzen.net/@samuel" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>samuel</span></a></span> </p><p>Why is Python special in this regard? Many applications, whether written in Python, Perl, Ruby, or C etc, embed a particular version of a library because they either can't rely on it being available system-wide, or because they can't rely on the system-provided one being completely <a href="https://mindly.social/tags/compatible" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>compatible</span></a> with their needs.</p><p>I find virtual environments an elegant solution to the problem, better than many other languages' solutions.</p><p><a href="https://mindly.social/tags/library" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>library</span></a> <a href="https://mindly.social/tags/embed" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>embed</span></a> <a href="https://mindly.social/tags/vendor" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>vendor</span></a> <a href="https://mindly.social/tags/venv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>venv</span></a> <a href="https://mindly.social/tags/virtualenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>virtualenv</span></a></p>
Seth Jones<p>After a series of system updates this week, my <a href="https://fosstodon.org/tags/Python" class="mention hashtag" rel="tag">#<span>Python</span></a> path variables are not updating correctly when using <a href="https://fosstodon.org/tags/virtualenv" class="mention hashtag" rel="tag">#<span>virtualenv</span></a> . Talk about frustrating.</p>
Simon D. ⏚<p>« Do not try and use a Python virtual environment from one Python installation or version with mod_wsgi, when mod_wsgi was compiled for a different one. »<br><a href="https://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html#virtual-environment-and-python-version" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">modwsgi.readthedocs.io/en/deve</span><span class="invisible">lop/user-guides/virtual-environments.html#virtual-environment-and-python-version</span></a></p><p>C'est génial <a href="https://mamot.fr/tags/virtualenv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>virtualenv</span></a> avec <a href="https://mamot.fr/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a>, mais <a href="https://mamot.fr/tags/mod_wsgi" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mod_wsgi</span></a> te remet direct les pieds sur terre.</p>