'Need help resolving non-zero exit status 1 submitting project
I'm trying to verify the submission of a directory for a school project, but everytime I try to test the submission I get this message:
"Command '('/Users/{myname}/Documents/Coding/tmp_verify_submission_OHA6GFA/venv/bin/pip', 'install', '-r', '/Users/{myname}/Documents/Coding/tmp_verify_submission_OHA6GFA/requirements.txt')' returned non-zero exit status 1."
There are two files in the directory: main.py and requirements.txt
I believe the problem is with main.py which is code to extract text from a google drive for a stock trading project.
Here is main.py:
import gdown
import json
import os.path
file_exists = os.path.exists('pelosi_stock.json')
url = "https://drive.google.com/file/d/1yBWLq-4xzOTFtVa-HAJTpVu5Y_X9EP18/view?usp=sharing"
output = 'pelosi_stock.json'
if file_exists == False:
gdown.download(url, output, fuzzy=True, quiet=True)
with open(output) as file:
py_dict = json.load(file)
print(py_dict['message'])
elif file_exists == True:
pass
Here is requirements.txt which is for the libraries the professor should download to make the main.py download:
gdown
json
os.path
Solution 1:[1]
I'm pretty sure your issue is the os.path in your requirements file, if you really needed the os package installed you'd have just os in there. That and json probably don't need to be in the requirements file since they're part of the standard library (ie they come with installing python)
Try removing at least the .path part in requirements.txt and I'm sure it will work.
Generally speaking, you install entire packages in python
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | shabuki |
