macosinstallationpython-reflex

The command pc not found after installing pynecone environment on my Mac computer


I read it https://pynecone.app/docs/getting-started/installation.

Installing

$ pip install pynecone
$ mkdir my_app_name
$ cd my_app_name
$ pc init
zsh: command not found: PC

Why the command pc not found?

After installing, I tried to create a project but failed because no pc command.

In my case, I use a second-hand Mac.
And maybe the current Python environment are mass.
So, I have no idea what to do next. Can anyone help me?


Solution

  • Install NodeJS 12.22

    1. Install n
    $ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
    
    $ sudo npm install -g n
    
    1. Install NodeJS 12.22 by n
    $ sudo n 12.22
    

    Setup pynecone environment

    1. Install anaconda from https://www.anaconda.com/products/distribution
    2. Make pynecone virtual environment by conda command
    $ conda create -n pynecone-311 python=3.11
    
    $ conda activate pynecone-311
    
    $ pip install pynecone
    
    $ mkdir my_app_name
    $ cd my_app_name
    $ pc init
    $ pc run 
    

    Then you can enjoy it.

    If you need more information to use conda and n.

    You can refer to my document here.
    https://hackmd.io/@milochen0418/create-pynecone-env-in-mac
    It details how to use them to
    manage the virtual environment.