Exit code 1 when deploying to Heroku - python

-----> Installing requirements with pip
Collecting Flask==0.8
Downloading Flask-0.8.tar.gz (494 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-b10vp26m/flask_796f31ca16564e4e937e606cfdff087d/setup.py", line 62
print "Audit requires PyFlakes installed in your system."""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
! Push rejected, failed to compile Python app.
! Push failed
I am attempting to deploy a Discord Bot to Heroku for more uptime, and I am getting this error when I attempt to do a manual deployment on the Heroku App.
My requirements.txt file:
Flask==0.8
Jinja2==2.6
Werkzeug==0.8.3
certifi==0.0.8
chardet==1.0.1
distribute==0.6.24
gunicorn==0.14.2
requests==0.11.1
pyflakes==2.5.0
Are there any dependencies I am missing? And is this even the right way to go about this?
I know I am missing Pyflakes but it is in my requirements file so I am not sure.

Flask 0.8 is over 11 years old and made for an older version of Python, you should specify newer versions of packages in your requirements, for example Flask==2.2.2.
You should make sure your code is compatible with the latest versions and update the dependencies.

Related

How to install pylibfreenect in python?

Im trying to install pylibfreenect in Pycharm but its giving me this error message:
Collecting pylibfreenect2
Using cached pylibfreenect2-0.1.4.tar.gz (125 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Steffen\AppData\Local\Temp\pip-install-wbvm76g8\pylibfreenect2_46804a2858bc48829d3d48cfaa63fcde\setup.py", line 25, in <module>
raise OSError("{}: is not found".format(libfreenect2_configh_path))
OSError: /usr/local/include\libfreenect2\config.h: is not found
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
I looked up the GitHub forum https://github.com/OpenKinect/libfreenect but I dont know how to install libfreenect from there.
I know it cannot find config.h because the website is down. How can I still install it?
If possible detailed instructions please.
To intall libfreenect2 on Windows, you need to install few dependencies libusb, TurboJPEG, GLFW.
And then you need to clone libfreenect2 repo to build using make && make install command. This will install libfreenect2 on your machine.
Same steps are for MacOS.
See this readme for detailed steps - https://github.com/OpenKinect/libfreenect2/blob/master/README.md

How to install pyodide package on vs code

I want to use the pyodide package on a data analysis project on vs code but i can't install this packcage , I need help please
I tried to run pip install pyodide but i have this problem :
Collecting pyodide
Using cached pyodide-0.0.2.tar.gz (19 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\Mouad\AppData\Local\Temp\pip-install-hytn_jkn\pyodide_d2f2163c84794780a8a92f7a373c9c76\setup.py", line 7, in
raise ValueError(
ValueError: Pyodide is a Python distribution that runs in the browser or Node.js. It cannot be installed from PyPi.
See https://github.com/pyodide/pyodide for how to use Pyodide.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Failing to install python cryptography library using pip on msys2/mingw

Collecting cryptography
Downloading cryptography-37.0.2.tar.gz (585 kB)
-------------------------------------- 585.4/585.4 kB 7.4 MB/s eta 0:00:00
Installing build dependencies ... error
error: subprocess-exited-with-error
pip subprocess to install build dependencies did not run successfully.
exit code: 1
[41 lines of output]
Collecting setuptools!=60.9.0,>=40.6.0
Using cached setuptools-62.3.1-py3-none-any.whl (1.2 MB)
Collecting wheel
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting cffi>=1.12
Using cached cffi-1.15.0.tar.gz (484 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
python setup.py egg_info did not run successfully.
exit code: 1
[16 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:/Users/####/AppData/Local/Temp/pip-install-myhhpkap/cffi_c72832fd79d3476b80c36655663d2237/setup.py", line 126, in <module>
if sys.platform == "win32" and uses_msvc():
File "C:/Users/####/AppData/Local/Temp/pip-install-myhhpkap/cffi_c72832fd79d3476b80c36655663d2237/setup.py", line 105, in uses_msvc
return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')
File "C:/msys64/mingw64/lib/python3.9/site-packages/setuptools/_distutils/command/config.py", line 225, in try_compile
self._compile(body, headers, include_dirs, lang)
File "C:/msys64/mingw64/lib/python3.9/site-packages/setuptools/_distutils/command/config.py", line 132, in _compile
self.compiler.compile([src], include_dirs=include_dirs)
File "C:/msys64/mingw64/lib/python3.9/site-packages/setuptools/_distutils/_msvccompiler.py", line 327, in compile
self.initialize()
File "C:/msys64/mingw64/lib/python3.9/site-packages/setuptools/_distutils/_msvccompiler.py", line 218, in initialize
raise DistutilsPlatformError("--plat-name must be one of {}"
distutils.errors.DistutilsPlatformError: --plat-name must be one of ('win32', 'win-amd64', 'win-arm32', 'win-arm64')
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
Encountered error while generating package metadata.
See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
pip subprocess to install build dependencies did not run successfully.
exit code: 1
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Pip and setuptools are both completely up to date, I have rust installed, and linked to the x86_64-pc-windows-gnu toolchain, and I have the C++ tools from VS. I have even tried completely reinstalling msys2 and it still gives me the same error every single time. I have gotten this installed this way before so I know it is possible, but it was on a different machine and I didn't run into this issue. I am really at a loss as to how to get this installed so any help would be greatly appreciated.
Edit: So after a bit more hunting and searching. I realized that there is a msys2 package for the cryptography library that you need to use instead of trying to use pip. As far as I can tell there is some sort of compilation error that results from running it in the msys2 environment instead of a windows terminal that is causing it. Here is the package I used https://packages.msys2.org/package/mingw-w64-x86_64-python3-cryptography

pip install fails with heatmap

I'm trying to install heatmap with pip but this error comes out and I don't know how to solve it.
This is the error that cmd shows to me.
$ pip3 install heatmap
Collecting heatmap
Using cached heatmap-2.2.1.zip (25 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\giada\AppData\Local\Temp\pip-install-aq8mcl9q\heatmap_ea8ca237b3b44b6c99b25c44bf100681\setup.py", line 15
print "On Windows, skipping build_ext."
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("On Windows, skipping build_ext.")?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Version:
pip: pip 22.0.4
python: Python 3.9.7
That's a syntax error indicative of Python 2 syntax in Python 3.
The heatmap project is compatible with Python 2 only, quoth their website:
Requires Python 2.5+.
That latest version is from 2013, anyway. You'll need to find a more modern, or at least maintained, version to work with Python 3.

Python manage.py runserver gives error of raise ImportError('win32 only') ImportError: win32 only, using python 3.9, elementary OS 5.1.7 Hera

I'm new to Django, creating my first project. everything was working fine and suddenly got an error of ImportError('win32 only') ImportError: win32. Searched a lot online but didn't find a solution.
try to install pip install pywin32, got an error
ERROR: Could not find a version that satisfies the requirement pywin32 (from versions: none)
ERROR: No matching distribution found for pywin32
try to install pypiwin32, got error as below,
Collecting pypiwin32
Using cached pypiwin32-223-py3-none-any.whl (1.7 kB)
Using cached pypiwin32-219.zip (4.8 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-e3895f2v/pypiwin32_a7f6ac392d7c456a8f054610add7c850/setup.py", line 121
print "Building pywin32", pywin32_version
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Building pywin32", pywin32_version)?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Nothing working and do not know how to solve this, and what did I do wrong, as it was working fine one second and next to its crashed, Can anybody please help?
im quoting from https://pypi.org/project/pywin32/ "This is the readme for the Python for Win32 (pywin32) extensions, which provides access to many of the Windows APIs from Python". And you dont have any windows api's available because you are on linux.

Categories