Python heroku未满足要求

Python heroku未满足要求,python,django,heroku,ubuntu-18.04,Python,Django,Heroku,Ubuntu 18.04,我在heroku上部署Django项目时出错 ERROR: Could not find a version that satisfies the requirement apturl==0.5.2 (from -r /tmp/build_3724e729_/requirements.txt (line 1)) (from versions: none) ERROR: No matching distribution found for apturl==0.5.2 (from -r

我在heroku上部署Django项目时出错

ERROR: Could not find a version that satisfies the requirement apturl==0.5.2 (from -r /tmp/build_3724e729_/requirements.txt (line 1)) (from versions: none)
       ERROR: No matching distribution found for apturl==0.5.2 (from -r /tmp/build_3724e729_/requirements.txt (line 1))
我试着重新安装apturl,我可以看到下面-解包aptutl 0.5.2,但我仍然在heroku遇到错误

 sudo apt-get install apturl apturl-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  efibootmgr libboost-program-options1.65.1 libegl1-mesa libfwup1
  libgoogle-perftools4 libllvm9 libpcrecpp0v5 libtcmalloc-minimal4
  libwayland-egl1-mesa libyaml-cpp0.5v5 linux-headers-5.4.0-45-generic
  linux-hwe-5.4-headers-5.4.0-42 linux-hwe-5.4-headers-5.4.0-45
  linux-image-5.4.0-45-generic linux-modules-5.4.0-45-generic
  linux-modules-extra-5.4.0-45-generic mongo-tools mongodb-server-core
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  libgtk2-perl
The following NEW packages will be installed:
  apturl apturl-common
0 upgraded, 2 newly installed, 0 to remove and 52 not upgraded.
Need to get 19.4 kB of archives.
After this operation, 228 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 apturl-common amd64 0.5.2ubuntu14.2 [10.9 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 apturl amd64 0.5.2ubuntu14.2 [8,464 B]
Fetched 19.4 kB in 1s (31.2 kB/s) 
Selecting previously unselected package apturl-common.
(Reading database ... 229913 files and directories currently installed.)
Preparing to unpack .../apturl-common_0.5.2ubuntu14.2_amd64.deb ...
Unpacking apturl-common (0.5.2ubuntu14.2) ...
Selecting previously unselected package apturl.
Preparing to unpack .../apturl_0.5.2ubuntu14.2_amd64.deb ...
Unpacking apturl (0.5.2ubuntu14.2) ...
Setting up apturl-common (0.5.2ubuntu14.2) ...
Setting up apturl (0.5.2ubuntu14.2) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...

apturl
是一个系统包而不是python包。它是通过
apt
而不是
python
pip
安装的。您一直在使用,通过
requirements.txt
(或
Pipfile
setup.py
)安装依赖项。您需要通过
Aptfile
@TinNguyen安装依赖项的位置。请检查以上我做了sudo apt只得到,而不是pip安装。我知道。然而,当您部署应用程序时,您的构建环境将重置。您无法编写
sudo-apt-get-install-apturl-apturl-common
。当您部署应用程序时,您的应用程序不会首先部署。这是正确的一步,如果你在一台你完全控制的Ubuntu机器上工作。一种机器,其文件系统在每次代码提交后都不会被删除。@TinNguyen。你能给我解释一下我该怎么做吗?我是新来的,对这件事不太了解。看看你需要什么。对于Python,您可能有一个名为
requirements.txt
的文件。对于Apt,您需要一个
Aptfile
。他们的GitHub上描述了它的工作原理。Apt buildpack需要在Python multiple之前运行(参见链接文章),因此当Python检查
apturl
时,它已经安装好了,不需要在那里执行任何操作。