我试图在虚拟环境中从我的项目目录中运行python manage.py shell_plus --notebook。这个命令以前是起作用的,但现在不再起作用了,我认为这个问题肯定与某些包版本冲突有关。
我有一个虚拟环境,安装了以下软件包:
Package Version
-------------------- -----------
appnope 0.1.3
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
asgiref 3.5.2
asttokens 2.0.5
attrs 21.4.0
backcall 0.2.0
backports.zoneinfo 0.2.1
beautifulsoup4 4.11.1
bleach 5.0.0
cffi 1.15.0
debugpy 1.6.0
decorator 5.1.1
defusedxml 0.7.1
dj-database-url 0.5.0
Django 4.0.4
django-extensions 3.1.5
django-heroku 0.3.1
django-on-heroku 1.1.2
entrypoints 0.4
executing 0.8.3
fastjsonschema 2.15.3
gunicorn 20.1.0
importlib-resources 5.7.1
ipykernel 6.13.0
ipython 8.3.0
ipython-genutils 0.2.0
ipywidgets 7.7.0
jedi 0.18.1
Jinja2 3.1.2
jsonschema 4.5.1
jupyter 1.0.0
jupyter-client 7.3.1
jupyter-console 6.4.3
jupyter-core 4.10.0
jupyterlab-pygments 0.2.2
jupyterlab-widgets 1.1.0
MarkupSafe 2.1.1
matplotlib-inline 0.1.3
mistune 0.8.4
nbclient 0.6.3
nbconvert 6.5.0
nbformat 5.4.0
nest-asyncio 1.5.5
notebook 6.4.11
numpy 1.22.3
packaging 21.3
pandocfilters 1.5.0
parso 0.8.3
pexpect 4.8.0
pickleshare 0.7.5
pip 22.1
prometheus-client 0.14.1
prompt-toolkit 3.0.29
psutil 5.9.0
psycopg2 2.9.3
psycopg2-binary 2.9.3
ptyprocess 0.7.0
pure-eval 0.2.2
pycparser 2.21
Pygments 2.12.0
pyparsing 3.0.9
pyrsistent 0.18.1
python-dateutil 2.8.2
pyzmq 22.3.0
qtconsole 5.3.0
QtPy 2.1.0
scipy 1.8.1
Send2Trash 1.8.0
setuptools 49.2.1
six 1.16.0
soupsieve 2.3.2.post1
sqlparse 0.4.2
stack-data 0.2.0
terminado 0.15.0
tinycss2 1.1.1
tornado 6.1
traitlets 5.2.1.post0
wcwidth 0.2.5
webencodings 0.5.1
whitenoise 6.1.0
widgetsnbextension 3.6.0
zipp 3.8.0django-heroku安装得和psycopg2一样好,但不知怎么的,我还是一直收到这个错误。我在Stackoverflow上尝试了所有的东西(甚至完全恢复了Python ),但是没有解决这个问题。
Python:Python 3.8.9机器:Macbook Pro with M1 chip
会很感激你的帮助!谢谢!
更新:
解决这个问题的办法是运行./manage.py shell_plus --notebook而不是python manage.py shell_plus --notebook。我不明白这为什么解决了这个问题,如果有一种方法可以让命令与python一起运行,那就太好了!谢谢你的评论!
发布于 2022-05-19 05:36:00
你跑了吗?
pip install django-heroku您需要通过运行以下命令来安装psycopg2:
pip install psycopg2 这是安装它的唯一方法。如果这不能修复错误。我认为您需要在settings.py文件中共享您的heroku设置。
https://stackoverflow.com/questions/72298332
复制相似问题