did I set up virtual environment py4web wrong?

365 views
Skip to first unread message

Alex Glaros

unread,
Jun 4, 2022, 7:27:32 PM6/4/22
to py4web
Can't get py4web virtual env to install on Windows


C:\>C:\Users\alex_\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts/py4web run apps
Usage: py4web run [OPTIONS] APPS_FOLDER
Try 'py4web run -h' for help.

Error: Invalid value for 'APPS_FOLDER': Path 'apps' does not exist.

THEN I RAN: C:\Users\alex_\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts>python3.10 -m venv venv . venv/bin/activate pip install

WHICH RAN WITHOUT ERRORS.

IF I RUN: C:\Users\alex_\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts>py4web
Usage: py4web [OPTIONS] COMMAND [ARGS]...

  PY4WEB - a web framework for rapid development of efficient database driven
  web applications

  Type "C:\Users\alex_\AppData\Local\Packages\PythonSoftwareFoundation.Python.
  3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts\py4web
  COMMAND -h" for available options on commands

Options:
  -help, -h, --help  Show this message and exit.
 
INITIAL SET UP:

Microsoft Windows [Version 10.0.19043.1706]
(c) Microsoft Corporation. All rights reserved.

C:\Users\alex_>python3 -m venv venv

C:\Users\alex_>. venv/bin/activate
'.' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\alex_>python -m pip install --upgrade py4web --no-cache-dir
Collecting py4web
  Downloading py4web-1.20220506.1.tar.gz (9.0 MB)
     ---------------------------------------- 9.0/9.0 MB 8.6 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting wheel
  Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting ombott>=0.0.10
  Downloading ombott-0.0.14-py3-none-any.whl (46 kB)
     ---------------------------------------- 46.3/46.3 KB ? eta 0:00:00
Collecting click
  Downloading click-8.1.3-py3-none-any.whl (96 kB)
     ---------------------------------------- 96.6/96.6 KB ? eta 0:00:00
Collecting colorama
  Downloading colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting cryptography
  Downloading cryptography-37.0.2-cp36-abi3-win_amd64.whl (2.4 MB)
     ---------------------------------------- 2.4/2.4 MB 11.0 MB/s eta 0:00:00
Collecting portalocker
  Downloading portalocker-2.4.0-py2.py3-none-any.whl (16 kB)
Collecting tornado
  Downloading tornado-6.1.tar.gz (497 kB)
     ------------------------------------- 497.4/497.4 KB 15.2 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting renoir>=1.4.0
  Downloading Renoir-1.5.4-py3-none-any.whl (30 kB)
Collecting requests
  Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)
     ---------------------------------------- 63.1/63.1 KB ? eta 0:00:00
Collecting threadsafevariable>=1.2
  Downloading threadsafevariable-1.2.tar.gz (2.2 kB)
  Preparing metadata (setup.py) ... done
Collecting pyjwt>=2.0.1
  Downloading PyJWT-2.4.0-py3-none-any.whl (18 kB)
Collecting pluralize>=0.1.9
  Downloading pluralize-0.1.9.tar.gz (4.1 kB)
  Preparing metadata (setup.py) ... done
Collecting rocket3
  Downloading rocket3-1.3.2.tar.gz (16 kB)
  Preparing metadata (setup.py) ... done
Collecting yatl>=20211217.1
  Downloading yatl-20211217.1.tar.gz (17 kB)
  Preparing metadata (setup.py) ... done
Collecting pydal>=20220213.2
  Downloading pydal-20220213.2.tar.gz (327 kB)
     ------------------------------------- 327.9/327.9 KB 19.9 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting watchgod>=0.6
  Downloading watchgod-0.8.2-py3-none-any.whl (12 kB)
Collecting anyio<4,>=3.0.0
  Downloading anyio-3.6.1-py3-none-any.whl (80 kB)
     ---------------------------------------- 80.6/80.6 KB ? eta 0:00:00
Collecting cffi>=1.12
  Downloading cffi-1.15.0-cp310-cp310-win_amd64.whl (180 kB)
     ---------------------------------------- 180.3/180.3 KB ? eta 0:00:00
Collecting pywin32>=226
  Downloading pywin32-304-cp310-cp310-win_amd64.whl (12.1 MB)
     --------------------------------------- 12.1/12.1 MB 11.5 MB/s eta 0:00:00
Collecting charset-normalizer~=2.0.0
  Downloading charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting certifi>=2017.4.17
  Downloading certifi-2022.5.18.1-py3-none-any.whl (155 kB)
     -------------------------------------- 155.2/155.2 KB 9.7 MB/s eta 0:00:00
Collecting idna<4,>=2.5
  Downloading idna-3.3-py3-none-any.whl (61 kB)
     ---------------------------------------- 61.2/61.2 KB ? eta 0:00:00
Collecting urllib3<1.27,>=1.21.1
  Downloading urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
     ---------------------------------------- 139.0/139.0 KB ? eta 0:00:00
Collecting sniffio>=1.1
  Downloading sniffio-1.2.0-py3-none-any.whl (10 kB)
Collecting pycparser
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
     ---------------------------------------- 118.7/118.7 KB ? eta 0:00:00
Using legacy 'setup.py install' for py4web, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pluralize, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pydal, since package 'wheel' is not installed.
Using legacy 'setup.py install' for threadsafevariable, since package 'wheel' is not installed.
Using legacy 'setup.py install' for yatl, since package 'wheel' is not installed.
Using legacy 'setup.py install' for rocket3, since package 'wheel' is not installed.
Using legacy 'setup.py install' for tornado, since package 'wheel' is not installed.
Installing collected packages: yatl, threadsafevariable, rocket3, pywin32, pydal, pluralize, wheel, urllib3, tornado, sniffio, renoir, pyjwt, pycparser, portalocker, ombott, idna, colorama, charset-normalizer, certifi, requests, click, cffi, anyio, watchgod, cryptography, py4web
  Running setup.py install for yatl ... done
  Running setup.py install for threadsafevariable ... done
  Running setup.py install for rocket3 ... done
  Running setup.py install for pydal ... done
  Running setup.py install for pluralize ... done
  WARNING: The script wheel.exe is installed in 'C:\Users\alex_\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  Running setup.py install for tornado ... done
  WARNING: The script normalizer.exe is installed in 'C:\Users\alex_\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script watchgod.exe is installed in 'C:\Users\alex_\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  Running setup.py install for py4web ... done
Successfully installed anyio-3.6.1 certifi-2022.5.18.1 cffi-1.15.0 charset-normalizer-2.0.12 click-8.1.3 colorama-0.4.4 cryptography-37.0.2 idna-3.3 ombott-0.0.14 pluralize-0.1.9 portalocker-2.4.0 py4web-1.20220506.1 pycparser-2.21 pydal-20220213.2 pyjwt-2.4.0 pywin32-304 renoir-1.5.4 requests-2.27.1 rocket3-1.3.2 sniffio-1.2.0 threadsafevariable-1.2 tornado-6.1 urllib3-1.26.9 watchgod-0.8.2 wheel-0.37.1 yatl-20211217.1
WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
You should consider upgrading via the 'C:\Users\alex_\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip' command.

C:\Users\alex_>

Jim Steil

unread,
Jun 4, 2022, 11:28:25 PM6/4/22
to py4web
Did you run

python3 py4web setup apps

to setup the apps folder?

-Jim

Alex Glaros

unread,
Jun 5, 2022, 1:29:46 AM6/5/22
to py4web

TRIED: (venv) C:\Users\alex_\venv\reg_py4web>python3 py4web setup apps
python3: can't open file 'C:\\Users\\alex_\\venv\\reg_py4web\\py4web': [Errno 2] No such file or directory

Brute force method worked ... I copied all the getHub files to venv

Hope that's a good method?


Jim Steil

unread,
Jun 5, 2022, 9:53:21 AM6/5/22
to Alex Glaros, py4web
Maybe add the .py on the py4web file?

Like this

(venv) C:\Users\alex_\venv\reg_py4web>python3 py4web.py setup apps

Jim

--
You received this message because you are subscribed to a topic in the Google Groups "py4web" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/py4web/OsSa8lLHYo4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to py4web+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/py4web/ad4f0dc8-b13c-4f82-b1c7-bfcef4f62318n%40googlegroups.com.

Alex Glaros

unread,
Jun 5, 2022, 2:01:56 PM6/5/22
to py4web
Probably typed in wrong folder. Anyway, is working now, thanks.
Reply all
Reply to author
Forward
0 new messages