Skip to content Skip to sidebar Skip to footer

Installing Flask Project Can't Open Setup.py

I am following the Deploy to Production tutorial from Flask. I am required to run python setup.py bdist_wheel to build a wheel build distribution file. But that command gives this

Solution 1:

That page is not a standalone tutorial. A previous step in the tutorial walks you through making your project installable with a setup.py file. It's a separate step from deploying because you should install your project both during development and deployment.

The summary of the linked tutorial step is: create the following setup.py file to describe your project, then use pip to install the project in the virtualenv.

from setuptools import find_packages, setup

setup(
    name='flaskr',
    version='1.0.0',
    packages=find_packages(),
    include_package_data=True,
    install_requires=[
        'flask',
    ],
)
# install during development
pip install -e .

# install in production
pip install flaskr-1.0.0-py3-none-any.whl

Post a Comment for "Installing Flask Project Can't Open Setup.py"