Adding 'install_requires' to setup.py when making a python package

后端 未结 2 835
-上瘾入骨i
-上瘾入骨i 2020-12-13 12:53

To make a python package, in setup.py, I have the following:

setup(
    name=\'TowelStuff\',
    version=\'0.1.0\',
    author=\'J. Random Hacke         


        
相关标签:
2条回答
  • 2020-12-13 12:54

    You need to be using setuptools instead of distutils.

    Near the top of your script, try replacing

    from distutils.core import setup
    

    with

    from setuptools import setup
    
    0 讨论(0)
  • 2020-12-13 12:58
    try:
        from setuptools import setup
    except ImportError:
        from distutils.core import setup
    
    0 讨论(0)
提交回复
热议问题