Trying to deploy my project and got the error on requirements.txt

I am trying to deploy my very first website ever. After getting my files saved on github I created a fly.io account. I have not subscribed to the paid version if that matters. After signing in I ran the command fly launch and I get the error message. any advice?

Error message:
5/6] RUN set -ex && pip install --upgrade pip && pip install -r /tmp/requirements.txt && rm -rf /root/.cache/:
#8 0.490 + pip install --upgrade pip
#8 2.249 Requirement already satisfied: pip in /usr/local/lib/python3.11/site-packages (23.1.2)
#8 2.348 Collecting pip
#8 2.384 Downloading pip-23.2-py3-none-any.whl (2.1 MB)
#8 2.412 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 83.7 MB/s eta 0:00:00
#8 2.475 Installing collected packages: pip
#8 2.475 Attempting uninstall: pip
#8 2.478 Found existing installation: pip 23.1.2
#8 2.515 Uninstalling pip-23.1.2:
#8 2.636 Successfully uninstalled pip-23.1.2
#8 3.753 Successfully installed pip-23.2
#8 3.754 WARNING: Running pip as the β€˜root’ user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: 12. Virtual Environments and Packages β€” Python 3.11.4 documentation
#8 3.904 + pip install -r /tmp/requirements.txt
#8 4.828 Processing /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-124/altgraph-0.17.2-py2.py3-none-any.whl (from -r /tmp/requirements.txt (line 1))
#8 4.830 ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: β€˜/System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-124/altgraph-0.17.2-py2.py3-none-any.whl’
#8 4.830

Error: failed to fetch an image or build from source: error building: executor failed running [/bin/sh -c set -ex && pip install --upgrade pip && pip install -r /tmp/requirements.txt && rm -rf /root/.cache/]: exit code: 1

Hey @strikeouts27,
Welcome to fly.io’s community,
Can you share your fly.toml file

Can you share requirements.txt, I guess it contains some path

requirements.txt

altgraph @ file:///System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-124/altgraph-0.17.2-py2.py3-none-any.whl
asgiref==3.7.2
black==23.7.0
click==8.1.5
Django==4.2.3
future @ file:///System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-124/future-0.18.2-py3-none-any.whl
gunicorn==20.1.0
macholib @ file:///System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-124/macholib-1.15.2-py2.py3-none-any.whl
mypy-extensions==1.0.0
packaging==23.1
pathspec==0.11.1
platformdirs==3.8.1
six @ file:///System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-124/six-1.15.0-py2.py3-none-any.whl
sqlparse==0.4.4
tomli==2.0.1
typing_extensions==4.7.1

fly.toml

# fly.toml app configuration file generated for pagesapp on 2023-07-16T22:09:15-05:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = "pagesapp"
primary_region = "dfw"
console_command = "/code/manage.py shell"

[env]
  PORT = "8000"

[http_service]
  internal_port = 8000
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0
  processes = ["app"]

[[statics]]
  guest_path = "/code/static"
  url_prefix = "/static/"

Check this out

You can see file:/// urls are used to point to local files, which aren’t available to you at remote machine, so remove them if they are not required, or change them to get them from pip or copy the file to /tmp folder and install from there

where would these files be located is the question I have. Here is a screenshot of my directory



At this location

System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-124

Or Just Ctrl+click the file links

attempting

where would I control click the files. no link in visual studio code opens up.

ctrl+click

Hey @strikeouts27 ,
I just want to mention. This is totally not problem from fly.io as far as I understand.
Its problem with dependencies

Were you able to run the application on your local machine?

No, when I click or control click on the code line 1 it does not open anything.

I do not believe there is a file to open.

These were my instructions for doing this command. Is there a flaw in them?

(.venv) $ fly launch
Creating app in ~/desktop/code/pages
Scanning source code
Detected a Django app
? Choose an app name (leave blank to generate one): dfb-ch3-pages
automatically selected personal organization: Will Vincent
? Choose a region for deployment: Boston, Massachusetts (US) (bos)
App will use β€˜bos’ region as primary
Created app dfb-ch3-pages in organization β€˜personal’
Admin URL: Sign In Β· Fly
Hostname: dfb-ch3-pages.fly.dev
? Overwrite β€œ/Users/wsv/Desktop/dfb_42/ch3-pages/.dockerignore”? No
Set secrets on dfb-ch3-pages: SECRET_KEY
? Would you like to set up a Postgresql database now? No
? Would you like to set up an Upstash Redis database now? No
Wrote config file fly.toml
Your app is ready! Deploy with flyctl deploy

I am so sorry, this is my very first time deploying and using fly.io.

what technology are you using to showcase what you are doing?

is there a common way to deploy apps that I can try. or a basic

for the record I never created those files nor do I see them on my computer. if there is another way to deploy this website I would be most grateful.

1 Like

Its totally fine, don’t worry

Open Source Software named Screen to Gif

Try deploying a basic django app