Open bugwz opened 1 year ago
Add some python's sys path info:
(virtualenv) [shaman@142ba6b2f6af shaman]$ python
Python 3.6.8 (default, Sep 10 2021, 09:13:53)
[GCC 8.5.0 20210514 (Red Hat 8.5.0-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print(sys.path)
['', '/home/shaman/virtualenv/lib64/python36.zip', '/home/shaman/virtualenv/lib64/python3.6', '/home/shaman/virtualenv/lib64/python3.6/lib-dynload', '/usr/lib64/python3.6', '/usr/lib/python3.6', '/home/shaman/virtualenv/lib/python3.6/site-packages', '/home/shaman/shaman']
Why do you think that pecan has a populate command? Edit: oh, as @rakshithakamath94 points out, it's a custom Pecan command added by shaman to populate the postgresql database, I see
Please check if you have cloned the branch python3 if not please go ahead and do that.
Here's what I did which worked for me. Let me know if it works for you!
pip3 install -r requirements.txt
python3 setup.py install
export ALEMBIC_CONFIG="alembic.ini"
export PECAN_CONFIG="config/dev.py"
cp -rf alembic.ini /usr/local/lib/python3.11/site-packages/shaman-0.1-py3.11.egg/
pecan populate config/dev.py
pecan serve config/run.py
Thanks~ @rakshithakamath94 @dmick
I checkout python3
branch, and it's ok to run following cmds.
rm -rf ~/virtualenv
virtualenv ~/virtualenv
source ~/virtualenv/bin/activate
# Some changed for `config/run.py` and `config/dev.py`
# ...
pip install -r requirements.txt
pip install "cherrypy>=3.8.0,<9.0.0"
python setup.py develop
pecan populate config/dev.py
pecan serve config/run.py
Additional information:
When i test that, i found the cmd pip install "cherrypy>=3.8.0,<9.0.0"
is necessary, otherwise, will result the error:
ModuleNotFoundError: No module named 'cherrypy'
I think we can add this dependency, what do you think?
yes will add it
so the application is running?
@rakshithakamath94 yeah, it works. I created a PR to fix the dep problem of cherrypy
https://github.com/ceph/shaman/pull/136
What changes did you make to config? I am currently facing this issue and installing Cherrypy has not resolved it
When i run
pecan populate config/dev.py
, i met the error:My env is:
I found the
Project
is shaman's local class, i don't know how to fix it. Please~