Skip to content

Set PIP_REQUIRE_VIRTUALENV=false to make package command work in restricted environments#204

Merged
FeodorFitsner merged 1 commit into
mainfrom
fix/pip-require-virtualenv-202
May 28, 2026
Merged

Set PIP_REQUIRE_VIRTUALENV=false to make package command work in restricted environments#204
FeodorFitsner merged 1 commit into
mainfrom
fix/pip-require-virtualenv-202

Conversation

@FeodorFitsner
Copy link
Copy Markdown
Contributor

Summary

  • Adds PIP_REQUIRE_VIRTUALENV=false to the environment passed to the pip install invocation in the package command.
  • This overrides any user-set require-virtualenv = true (from ~/.pip/pip.conf or an inherited PIP_REQUIRE_VIRTUALENV env var), which otherwise aborts packaging with ERROR: Could not find an activated virtualenv (required).

Fixes #202. The workaround (PIP_REQUIRE_VIRTUALENV=false uv run flet build web) was confirmed in flet-dev/flet#6497; this applies it automatically.

Test plan

  • With require-virtualenv = true in ~/.pip/pip.conf, run flet build web (or the package command) and confirm packaging succeeds.

🤖 Generated with Claude Code

…202)

Overrides any user-set `require-virtualenv = true` (pip.conf or
PIP_REQUIRE_VIRTUALENV) that otherwise aborts the package command with
"Could not find an activated virtualenv (required)".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@FeodorFitsner FeodorFitsner mentioned this pull request May 28, 2026
2 tasks
@FeodorFitsner FeodorFitsner merged commit 0b656b5 into main May 28, 2026
11 of 13 checks passed
@FeodorFitsner FeodorFitsner deleted the fix/pip-require-virtualenv-202 branch May 28, 2026 20:06
FeodorFitsner added a commit that referenced this pull request Jun 6, 2026
* Prepare release 1.0.1 (Android: cache Python dist tarballs)

Bump all packages to 1.0.1 and add changelog entries for the new
persistent Python tarball cache in the serious_python_android Gradle
plugin: downloadDistArchive_* now writes to $FLET_CACHE_DIR/python-build/
(defaulting to ~/.flet/cache/python-build/) with onlyIfModified +
useETag "all", so subsequent builds issue a conditional GET against
objects.githubusercontent.com instead of re-downloading 30-100 MB per
ABI. Re-published tarballs at the same versioned URL are picked up
automatically via ETag/Last-Modified validators. Fixes
flet-dev/flet#6555.

Also rolls the PIP_REQUIRE_VIRTUALENV=false fix from #202/#204 into the
1.0.1 changelog (landed on main after 1.0.0), and adds **/.cxx/ to the
example android/.gitignore files to keep CMake build output out of git.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Add PR #208 link to 1.0.1 changelog entries

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Define PIP_REQUIRE_VIRTUALENV=false to make package command work in some environments

1 participant