尝试安装Heroku软件包时收到错误

时间:2019-10-17 22:36:50

标签: python django heroku bootstrap-4 pip

当我尝试安装用于将项目(学习日志)部署到Heroku所需的软件包时,它一直提示我此错误:

Josephs-MacBook-Pro:learning_log joseph$ source ll_env/bin/activate

(ll_env) Josephs-MacBook-Pro:learning_log joseph$ pip install psycopg2==2.7.*

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support

Collecting psycopg2==2.7.*

  Downloading https://files.pythonhosted.org/packages/c2/a0/ba2c28c13bce130f971158da8fc03c231ce7778a89935eb1c3e3e6437e7c/psycopg2-2.7.7-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (1.5MB)

     |████████████████████████████████| 1.5MB 1.3MB/s 

Installing collected packages: psycopg2

ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/psycopg2-2.7.7.dist-info'

Consider using the `--user` option or check the permissions.



(ll_env) Josephs-MacBook-Pro:learning_log joseph$ -m pip install psycopg2==2.7.*

-bash: -m: command not found

我不知道为什么我下载python 2.7并一直使用它时一直说python3

另外,当我昨天尝试运行服务器以获取学习日志时,它将无法正常运行(之前运行良好)。最终,我(在环境中)重新下载了python3 bootstrap4和django并运行服务器。旁注:我必须在python3 mangage.py runserver的末尾键入3才能正常工作。

有什么想法解决此问题并将其部署到Heroku中吗?

0 个答案:

没有答案