Open klenwell opened 1 week ago
I already have pyenv installed. But I didn't have latest stable version of Python available in it. So I needed to update then install it:
$ pyenv update
$ pyenv install 3.12.6
$ pip install cement
$ cement --help
usage: cement [-h] [-d] [-q] [-v] {generate} ...
Cement expects you to generate a project from scratch and to create the project directory itself. Since I already had a directory set up, I ran the command a little differently:
# generate the app in my existing dir and use -f to overwrite any existing files (otherwise will throw an error on conflict)
$ cement generate project -f .
$ pip install -r requirements.txt
# setuptools no longer comes prepacked with Python: https://stackoverflow.com/a/16511140/1093087
$ pip install -U pip setuptools
$ python setup.py install
I'm still having some issues running my new app. I'll address those in their own comment.
When I try to run the command line command from Cement docs, I get this:
$ dr_george_app --help
dr_george_app: command not found
When trying to run the file directly like I've done in other Cement apps, I get this error:
~/projects/dr-george$ python dr_george_app/main.py
Traceback (most recent call last):
File "/home/klenwell/projects/dr-george/dr_george_app/main.py", line 4, in <module>
from .core.exc import DrGeorgeAppError
ImportError: attempted relative import with no known parent package
Need to install the dev packages:
~/projects/dr-george$ pip install -r requirements-dev.txt
~/projects/dr-george$ dr_george_app --help
usage: dr_george_app [-h] [-d] [-q] [-v] {command1} ...
Overview
Build the basic app framework using the Python Cement framework for command line interfaces (CLI). When complete, should be able to run a basic command like this and be dropped into an interactive console:
Acceptance Criteria
python main.py interactive
will load live console.References