Skip to content

Init failed due to failure to install/detect required version of "bun" #5105

Description

@rwbot

Describe the bug
Fails to detect/install its required version of a package called "bun"

To Reproduce
Following the installation tutorial, created a new venv, installed reflex and tried to run init
Steps to reproduce the behavior:

Expected behavior
Expected reflex to install itself and its required dependencies in the current venv

Output

can@ubuntu:~/dev/rx$ source .venv/bin/activate
(rx) can@ubuntu:~/dev/rx$ pip install reflex
Defaulting to user installation because normal site-packages is not writeable
Collecting reflex
  Downloading reflex-0.7.6-py3-none-any.whl (846 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 846.2/846.2 KB 2.9 MB/s eta 0:00:00
Collecting fastapi!=0.111.0,!=0.111.1,>=0.96.0
  Downloading fastapi-0.115.12-py3-none-any.whl (95 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 95.2/95.2 KB 4.1 MB/s eta 0:00:00
Collecting typer<1.0,>=0.15.1
  Downloading typer-0.15.2-py3-none-any.whl (45 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.1/45.1 KB 3.0 MB/s eta 0:00:00
Collecting sqlmodel<0.1,>=0.0.14
  Downloading sqlmodel-0.0.24-py3-none-any.whl (28 kB)
Requirement already satisfied: typing-extensions>=4.6.0 in /home/can/.local/lib/python3.10/site-packages (from reflex) (4.13.1)
Collecting python-socketio<6.0,>=5.7.0
  Downloading python_socketio-5.12.1-py3-none-any.whl (76 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 76.9/76.9 KB 2.7 MB/s eta 0:00:00
Collecting python-multipart<1.0,>=0.0.20
  Downloading python_multipart-0.0.20-py3-none-any.whl (24 kB)
Requirement already satisfied: uvicorn>=0.20.0 in /home/can/.local/lib/python3.10/site-packages (from reflex) (0.34.0)
Collecting rich<14.0,>=13.0.0
  Downloading rich-13.9.4-py3-none-any.whl (242 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 242.4/242.4 KB 3.0 MB/s eta 0:00:00
Collecting reflex-hosting-cli>=0.1.29
  Downloading reflex_hosting_cli-0.1.36-py3-none-any.whl (38 kB)
Collecting wrapt<2.0,>=1.17.0
  Downloading wrapt-1.17.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (82 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 82.8/82.8 KB 3.9 MB/s eta 0:00:00
Requirement already satisfied: httpx<1.0,>=0.25.1 in /home/can/.local/lib/python3.10/site-packages (from reflex) (0.28.1)
Requirement already satisfied: packaging<25.0,>=23.1 in /home/can/.local/lib/python3.10/site-packages (from reflex) (24.2)
Collecting redis<6.0,>=4.3.5
  Downloading redis-5.2.1-py3-none-any.whl (261 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 261.5/261.5 KB 4.9 MB/s eta 0:00:00
Requirement already satisfied: jinja2<4.0,>=3.1.2 in /home/can/.local/lib/python3.10/site-packages (from reflex) (3.1.6)
Collecting alembic<2.0,>=1.11.1
  Downloading alembic-1.15.2-py3-none-any.whl (231 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 231.9/231.9 KB 5.4 MB/s eta 0:00:00
Collecting granian[reload]>=2.2.0
  Downloading granian-2.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 7.1 MB/s eta 0:00:00
Requirement already satisfied: pydantic<3.0,>=1.10.21 in /home/can/.local/lib/python3.10/site-packages (from reflex) (2.11.2)
Requirement already satisfied: psutil<8.0,>=5.9.4 in /home/can/.local/lib/python3.10/site-packages (from reflex) (7.0.0)
Collecting distro<2.0,>=1.8.0
  Downloading distro-1.9.0-py3-none-any.whl (20 kB)
Collecting gunicorn<24.0.0,>=23.0.0
  Downloading gunicorn-23.0.0-py3-none-any.whl (85 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 85.0/85.0 KB 5.1 MB/s eta 0:00:00
Requirement already satisfied: platformdirs<5.0,>=3.10.0 in /home/can/.local/lib/python3.10/site-packages (from reflex) (4.3.7)
Collecting SQLAlchemy>=1.4.0
  Downloading sqlalchemy-2.0.40-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 8.7 MB/s eta 0:00:00
Requirement already satisfied: Mako in /usr/lib/python3/dist-packages (from alembic<2.0,>=1.11.1->reflex) (1.1.3)
Requirement already satisfied: starlette<0.47.0,>=0.40.0 in /home/can/.local/lib/python3.10/site-packages (from fastapi!=0.111.0,!=0.111.1,>=0.96.0->reflex) (0.46.1)
Requirement already satisfied: click>=8.0.0 in /usr/lib/python3/dist-packages (from granian[reload]>=2.2.0->reflex) (8.0.3)
Collecting watchfiles~=1.0
  Downloading watchfiles-1.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (454 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 454.9/454.9 KB 5.6 MB/s eta 0:00:00
Requirement already satisfied: httpcore==1.* in /home/can/.local/lib/python3.10/site-packages (from httpx<1.0,>=0.25.1->reflex) (1.0.7)
Requirement already satisfied: anyio in /home/can/.local/lib/python3.10/site-packages (from httpx<1.0,>=0.25.1->reflex) (4.9.0)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from httpx<1.0,>=0.25.1->reflex) (2020.6.20)
Requirement already satisfied: idna in /usr/lib/python3/dist-packages (from httpx<1.0,>=0.25.1->reflex) (3.3)
Requirement already satisfied: h11<0.15,>=0.13 in /home/can/.local/lib/python3.10/site-packages (from httpcore==1.*->httpx<1.0,>=0.25.1->reflex) (0.14.0)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/lib/python3/dist-packages (from jinja2<4.0,>=3.1.2->reflex) (2.0.1)
Requirement already satisfied: annotated-types>=0.6.0 in /home/can/.local/lib/python3.10/site-packages (from pydantic<3.0,>=1.10.21->reflex) (0.7.0)
Requirement already satisfied: pydantic-core==2.33.1 in /home/can/.local/lib/python3.10/site-packages (from pydantic<3.0,>=1.10.21->reflex) (2.33.1)
Requirement already satisfied: typing-inspection>=0.4.0 in /home/can/.local/lib/python3.10/site-packages (from pydantic<3.0,>=1.10.21->reflex) (0.4.0)
Collecting python-engineio>=4.11.0
  Downloading python_engineio-4.11.2-py3-none-any.whl (59 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.2/59.2 KB 3.4 MB/s eta 0:00:00
Collecting bidict>=0.21.0
  Downloading bidict-0.23.1-py3-none-any.whl (32 kB)
Collecting async-timeout>=4.0.3
  Downloading async_timeout-5.0.1-py3-none-any.whl (6.2 kB)
Collecting tabulate<0.10.0,>=0.9.0
  Downloading tabulate-0.9.0-py3-none-any.whl (35 kB)
Collecting charset-normalizer<4.0.0,>=3.3.2
  Downloading charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (146 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 146.1/146.1 KB 7.6 MB/s eta 0:00:00
Requirement already satisfied: pyyaml<7.0.0,>=6.0.2 in /home/can/.local/lib/python3.10/site-packages (from reflex-hosting-cli>=0.1.29->reflex) (6.0.2)
Collecting markdown-it-py>=2.2.0
  Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 87.5/87.5 KB 5.4 MB/s eta 0:00:00
Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /home/can/.local/lib/python3.10/site-packages (from rich<14.0,>=13.0.0->reflex) (2.19.1)
Collecting shellingham>=1.3.0
  Downloading shellingham-1.5.4-py2.py3-none-any.whl (9.8 kB)
Collecting mdurl~=0.1
  Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Collecting simple-websocket>=0.10.0
  Downloading simple_websocket-1.1.0-py3-none-any.whl (13 kB)
Collecting greenlet>=1
  Downloading greenlet-3.1.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (599 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 599.5/599.5 KB 7.6 MB/s eta 0:00:00
Requirement already satisfied: sniffio>=1.1 in /home/can/.local/lib/python3.10/site-packages (from anyio->httpx<1.0,>=0.25.1->reflex) (1.3.1)
Requirement already satisfied: exceptiongroup>=1.0.2 in /home/can/.local/lib/python3.10/site-packages (from anyio->httpx<1.0,>=0.25.1->reflex) (1.2.2)
Collecting wsproto
  Downloading wsproto-1.2.0-py3-none-any.whl (24 kB)
Installing collected packages: wsproto, wrapt, tabulate, shellingham, python-multipart, mdurl, gunicorn, greenlet, granian, distro, charset-normalizer, bidict, async-timeout, watchfiles, SQLAlchemy, simple-websocket, redis, markdown-it-py, sqlmodel, rich, python-engineio, fastapi, alembic, typer, python-socketio, reflex-hosting-cli, reflex
Successfully installed SQLAlchemy-2.0.40 alembic-1.15.2 async-timeout-5.0.1 bidict-0.23.1 charset-normalizer-3.4.1 distro-1.9.0 fastapi-0.115.12 granian-2.2.2 greenlet-3.1.1 gunicorn-23.0.0 markdown-it-py-3.0.0 mdurl-0.1.2 python-engineio-4.11.2 python-multipart-0.0.20 python-socketio-5.12.1 redis-5.2.1 reflex-0.7.6 reflex-hosting-cli-0.1.36 rich-13.9.4 shellingham-1.5.4 simple-websocket-1.1.0 sqlmodel-0.0.24 tabulate-0.9.0 typer-0.15.2 watchfiles-1.0.5 wrapt-1.17.2 wsproto-1.2.0
(rx) can@ubuntu:~/dev/rx$ reflex init
─────────────────────────────────── Initializing rx ───────────────────────────────────
Info: Using custom Bun path: /home/can/.nvm/versions/node/v22.14.0/bin/bun
Reflex requires bun version 1.2.8 or higher to run, but the detected version is 1.2.7. 
If you have specified a custom bun path in your config, make sure to provide one that 
satisfies the minimum version requirement.
(rx) can@ubuntu:~/dev/rx$ reflex init --loglevel debug
Debug: Overriding config value loglevel with env var LOGLEVEL=debug
───────────────────────────────────── System Info ─────────────────────────────────────
Debug: Config file: 
'/home/can/dev/rx/.venv/lib/python3.10/site-packages/reflex/config.py'
Debug: Config: app_name='' app_module_import=None loglevel=<LogLevel.DEBUG: 'debug'> 
frontend_port=None frontend_path='' backend_port=None api_url='http://localhost:8000' 
deploy_url='http://localhost:3000' backend_host='0.0.0.0' db_url='sqlite:///reflex.db' 
async_db_url=None redis_url=None telemetry_enabled=True 
bun_path=PosixPath('/home/can/.local/share/reflex/bun/bin/bun') 
static_page_generation_timeout=60 cors_allowed_origins=['*'] tailwind={'plugins': 
['@tailwindcss/typography']} timeout=None next_compression=True 
next_dev_indicators=False react_strict_mode=True frontend_packages=[] 
gunicorn_worker_class='uvicorn.workers.UvicornH11Worker' gunicorn_workers=None 
gunicorn_max_requests=None gunicorn_max_requests_jitter=None 
state_manager_mode=<StateManagerMode.DISK: 'disk'> redis_lock_expiration=10000 
redis_lock_warning_threshold=1000 redis_token_expiration=3600 env_file=None 
show_built_with_reflex=None is_reflex_cloud=False extra_overlay_function=None
Debug: Running command: [PosixPath('/home/can/.nvm/versions/node/v22.14.0/bin/node'), 
'-v']
Debug: Running command: ['/home/can/.nvm/versions/node/v22.14.0/bin/bun', '-v']
Debug: [Reflex 0.7.6 with Python 3.10.12 (PATH: /home/can/dev/rx/.venv/bin/python)]
Debug: [Node 22.14.0 (Minimum: 18.18.0) 
(PATH:/home/can/.nvm/versions/node/v22.14.0/bin/node)]
Debug: [Bun 1.2.7 (Minimum: 1.2.8) (PATH: 
/home/can/.nvm/versions/node/v22.14.0/bin/bun)]
Debug: [OS Linux Ubuntu 22.04.5 LTS]
Debug: Using package installer at: ['/home/can/.nvm/versions/node/v22.14.0/bin/bun', 
'/home/can/.nvm/versions/node/v22.14.0/bin/npm']
Debug: Running command: [PosixPath('/home/can/.nvm/versions/node/v22.14.0/bin/node'), 
'-v']
Debug: Using package executer at: [['/home/can/.nvm/versions/node/v22.14.0/bin/bun'], 
['/home/can/.nvm/versions/node/v22.14.0/bin/npm']]
Debug: Unzip path: /usr/bin/unzip
─────────────────────────────────── Initializing rx ───────────────────────────────────
Debug: Checking for the latest version of reflex...
Debug: Sending HTTPS request to https://pypi.org/pypi/reflex/json
Debug: Received response from https://pypi.org/pypi/reflex/json in 0.126 seconds
Debug: Latest version of reflex: 0.7.6
Debug: Creating /home/can/.local/share/reflex
Debug: Ensuring reflex installation id.
Debug: Creating /home/can/.local/share/reflex
Debug: Validating frontend dependencies.
Info: Using custom Bun path: /home/can/.nvm/versions/node/v22.14.0/bin/bun
Debug: Running command: ['/home/can/.nvm/versions/node/v22.14.0/bin/bun', '-v']
Reflex requires bun version 1.2.8 or higher to run, but the detected version is 1.2.7. 
If you have specified a custom bun path in your config, make sure to provide one that 
satisfies the minimum version requirement.

Specifics (please complete the following information):

(rx) can@ubuntu:~/dev/rx$ reflex -v
0.7.6
(rx) can@ubuntu:~/dev/rx$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.5 LTS
Release:        22.04
Codename:       jammy
(rx) can@ubuntu:~/dev/rx$ python -V
Python 3.10.12
(rx) can@ubuntu:~/dev/rx$ pip -V
pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions