Skip to content

bug: Could not find virtualenv despite being activated #6497

@FPVian

Description

@FPVian

Duplicate Check

Describe the bug

Running flet build web fails with the following error: ERROR: Could not find an activated virtualenv (required). I am using uv but also tried creating a virtualenv with uvx virtualenv virtualenv and activating/installing dependencies there.

Code sample

Reproduced by creating an new project using flet create in an empty folder.

To reproduce

uvx flet create
uv sync
source .venv/bin/activate
flet build web

Expected behavior

No response

Screenshots / Videos

Operating System

macOS

Operating system details

Tahoe v26.4.1

Flet version

0.85.1

Regression

I'm not sure / I don't know

Suggestions

No response

Logs

Logs
(virtualenv) ian@Ians-MacBook-Pro delete-me % flet build web -vv
[18:22:10] Run subprocess: ['/Users/ian/flutter/3.41.7/bin/flutter', '--version', '--no-version-check', '--suppress-analytics']    
           Flutter executable: /Users/ian/flutter/3.41.7/bin/flutter                                                               
           Dart executable: /Users/ian/flutter/3.41.7/bin/dart                                                                     
           Run subprocess: ['/Users/ian/flutter/3.41.7/bin/dart', 'run', '--suppress-analytics', 'serious_python:main', 'package', 
           '/Users/ian/git/delete-me/src', '--platform', 'Pyodide', '-r', 'flet >=0.84.0', '--exclude', 'build,assets',            
           '--cleanup-packages', '--verbose']                                                                                      
           Running build hooks...Running build hooks...Running package command                                                     
[18:22:11] Extra PyPi indexes: [https://pypi.flet.dev, http://127.0.0.1:57754/simple]                                              
           Created temp directory: /var/folders/n9/4w09c4cx4_gd961grz4bsm540000gn/T/serious_python_tempWzKZXs                      
           Copying Python app from /Users/ian/git/delete-me/src to a temp directory                                                
           VERBOSE: Configured Pyodide/ platform with sitecustomize.py at                                                          
           /var/folders/n9/4w09c4cx4_gd961grz4bsm540000gn/T/serious_python_sitecustomizeXYrYSI/sitecustomize.py                    
           Installing [flet >=0.84.0] with pip command to /Users/ian/git/delete-me/build/flutter/build/site-packages               
           VERBOSE: /Users/ian/git/delete-me/build/flutter/build/build_python_3.12.9/python/bin/python3 -m pip install --upgrade   
           --disable-pip-version-check --only-binary :all: --extra-index-url https://pypi.flet.dev --extra-index-url               
           http://127.0.0.1:57754/simple --target /Users/ian/git/delete-me/build/flutter/build/site-packages flet >=0.84.0         
           ERROR: Could not find an activated virtualenv (required).                                                               
           Run subprocess: ['/Users/ian/flutter/3.41.7/bin/flutter', 'doctor', '--no-version-check', '--suppress-analytics']       
[18:22:18] Doctor summary (to see all details, run flutter doctor -v):                                                             
           [✓] Flutter (Channel stable, 3.41.7, on macOS 26.4.1 25E253 darwin-arm64, locale en-US)                                 
           [✗] Android toolchain - develop for Android devices                                                                     
               ✗ Unable to locate Android SDK.                                                                                     
                 Install Android Studio from: https://developer.android.com/studio/index.html                                      
                 On first launch it will assist you in installing the Android SDK components.                                      
                 (or visit https://flutter.dev/to/macos-android-setup for detailed instructions).                                  
                 If the Android SDK has been installed to a custom location, please use                                            
                 `flutter config --android-sdk` to update to that location.                                                        
                                                                                                                                   
           [!] Xcode - develop for iOS and macOS (Xcode 26.4.1)                                                                    
               ✗ Unable to get list of installed Simulator runtimes.                                                               
               ✗ CocoaPods not installed.                                                                                          
                   CocoaPods is a package manager for iOS or macOS platform code.                                                  
                   Without CocoaPods, plugins will not work on iOS or macOS.                                                       
                   For more info, see https://flutter.dev/to/platform-plugins                                                      
                 For installation instructions, see https://guides.cocoapods.org/using/getting-started.html#installation           
           [✓] Chrome - develop for the web                                                                                        
           [✓] Connected device (2 available)                                                                                      
           [✓] Network resources                                                                                                   
                                                                                                                                   
           ! Doctor found issues in 2 categories.                                                                                  
                                                                                                                                   
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Error building Flet app - see the log of failed command above.  

Additional details

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions