Flask: Weird error with "Flask" in setup_requires.

Created on 6 Jul 2014  路  5Comments  路  Source: pallets/flask

I have noticed a rather weird error when installing a package that has Flask in install_requires. Here is the partial output of python setup.py install

Searching for Flask
Best match: Flask RESTful-0.2.12
Downloading https://pypi.python.org/packages/source/F/Flask-RESTful/Flask-RESTful-0.2.12.tar.gz#md5=53049771f4ccb3f40194696bb683db77
Processing Flask-RESTful-0.2.12.tar.gz
Writing /tmp/easy_install-ljhjqn/Flask-RESTful-0.2.12/setup.cfg
Running Flask-RESTful-0.2.12/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ljhjqn/Flask-RESTful-0.2.12/egg-dist-tmp-4d1snj
Flask-RESTful 0.2.12 is already the active version in easy-install.pth

Installed /home/ayrx/.virtualenvs/test/lib/python3.3/site-packages/Flask_RESTful-0.2.12-py3.3.egg
error: Could not find required distribution Flask

Here is the relevant bit of setup.py

    install_requires=[
        "Flask",
        "Flask-RESTful",
        "cryptography"
    ]

Changing "Flask" to "flask" seems to fix things. Not a breaking bug but seems weird nonetheless especially since the packaging docs seem to indicate that "Flask" works fine.

Most helpful comment

I know this issue is closed but, while it is still actually an issue with setuptools, you should be able to get around this by specifying the Flask version in your setup.py. For example, instead of "Flask" use "Flask>=0.10.1".

All 5 comments

Closing this because it's an issue in setuptools.

I know this issue is closed but, while it is still actually an issue with setuptools, you should be able to get around this by specifying the Flask version in your setup.py. For example, instead of "Flask" use "Flask>=0.10.1".

@EmergentBehavior This is useful to know, thanks!

Just for future reference, as setuptools moved from Bitbucket to GitHub: https://github.com/pypa/setuptools/issues/498

Also, rather than specifying a version number, changing the order of the dependencies may help too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

westonplatter picture westonplatter  路  3Comments

wadegilmer picture wadegilmer  路  4Comments

runfalk picture runfalk  路  4Comments

jab picture jab  路  4Comments

maangulo12 picture maangulo12  路  4Comments