簡而言之,
如何python-firebase在pipenv install python-firebase 不作業時使用 pipenv安裝最新版本的 pip 包?
完整細節
為了讓 firebase 使用 python 代碼,按照此處的firebase 主頁的官方指導,我使用此處python-firebase列出的庫。
通過運行安裝它pipenv install python-firebase,我的代碼導致以下錯誤。
Traceback (most recent call last):
File "/home/namgivu/code/namgivu/l/gcp/gcp_firebase_start/_.py", line 56, in <module>
from firebase import firebase
File "/home/namgivu/code/namgivu/l/gcp/gcp_firebase_start/.venv/lib/python3.10/site-packages/firebase/__init__.py", line 3
from .async import process_pool
^^^^^
SyntaxError: invalid syntax
解決方案是安裝最新版本的 python-firebase,正如這里所討論的,但直接通過 pip 而不是 pipenv
pip install git https://github.com/ozgur/python-firebase
我用pipenv代替pip嘗試過,但沒有用
pipenv install git https://github.com/ozgur/python-firebase
所以我的問題是將什么放入 Pipfile以便我們可以通過簡單的安裝命令在我們的 Python 代碼中準備好firebase服務pipenv install?
uj5u.com熱心網友回復:
根據這里的檔案來自pipenv
pipenv install 與 pip install 語法完全兼容
所以你可以試試
pipenv install \
git https://github.com/ozgur/python-firebase@0d79d7609844569ea1cec4ac71cb9038e834c355#egg=python-firebase
正如您所鏈接的建議所建議的那樣。#egg=python-firebase附加通知是因為pipenv需要一個#egg版本控制依賴項的片段。
為了回答您的問題,以下是由Pipfile生成的pipenv,盡管您應該依靠pipenv為您生成此檔案。
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
python-firebase = {ref = "0d79d7609844569ea1cec4ac71cb9038e834c355", git = "https://github.com/ozgur/python-firebase"}
[dev-packages]
[requires]
python_version = "3.9"
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/336922.html
