Scikit-optimize: Setup.py install does not work

Created on 25 Jul 2016  路  6Comments  路  Source: scikit-optimize/scikit-optimize

Not sure why, but locally python setup.py install never seems to work. The skopt module can never found afterwards. By contrast python setup.py develop does work.

Can anybody try to reproduce this in some test env?

Bug Build / CI Major

Most helpful comment

I think this is the fix:

try:
    from setuptools import setup, find_packages
except ImportError:
    from distutils.core import setup, find_packages

setup(name='skopt',
      version='0.0',
      packages=find_packages(), #fix
      description='Sequential model-based optimization toolbox.')

Unsure what to do if setuptools is not installed. Should we try to import it from distutils? I've managed this many years without learning anything about python packaging (hell), so any wisdom would be appreciated.

All 6 comments

$ python setup.py install                                                (blah)
running install
running bdist_egg
running egg_info
creating skopt.egg-info
writing dependency_links to skopt.egg-info/dependency_links.txt
writing skopt.egg-info/PKG-INFO
writing top-level names to skopt.egg-info/top_level.txt
writing manifest file 'skopt.egg-info/SOURCES.txt'
reading manifest file 'skopt.egg-info/SOURCES.txt'
writing manifest file 'skopt.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-x86_64/egg
running install_lib
warning: install_lib: 'build/lib' does not exist -- no Python modules to install

creating build
creating build/bdist.macosx-10.6-x86_64
creating build/bdist.macosx-10.6-x86_64/egg
creating build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying skopt.egg-info/PKG-INFO -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying skopt.egg-info/SOURCES.txt -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying skopt.egg-info/dependency_links.txt -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
copying skopt.egg-info/top_level.txt -> build/bdist.macosx-10.6-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/skopt-0.0-py3.5.egg' and adding 'build/bdist.macosx-10.6-x86_64/egg' to it
removing 'build/bdist.macosx-10.6-x86_64/egg' (and everything under it)
Processing skopt-0.0-py3.5.egg
Copying skopt-0.0-py3.5.egg to /Users/thead/anaconda/envs/blah/lib/python3.5/site-packages
Adding skopt 0.0 to easy-install.pth file

Installed /Users/thead/anaconda/envs/blah/lib/python3.5/site-packages/skopt-0.0-py3.5.egg
Processing dependencies for skopt==0.0
Finished processing dependencies for skopt==0.0

Same here python3.5. I think the hint is in

running install_lib
warning: install_lib: 'build/lib' does not exist -- no Python modules to install

I think this is the fix:

try:
    from setuptools import setup, find_packages
except ImportError:
    from distutils.core import setup, find_packages

setup(name='skopt',
      version='0.0',
      packages=find_packages(), #fix
      description='Sequential model-based optimization toolbox.')

Unsure what to do if setuptools is not installed. Should we try to import it from distutils? I've managed this many years without learning anything about python packaging (hell), so any wisdom would be appreciated.

I suppose that is followed by most packages.

Do send the fix as a pull request.

+1 if that works

Change directory to the root (where you have placed your setup.py)

Change directory to the root (where you have placed your setup.py)

and if I can't? any other way?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tupui picture tupui  路  6Comments

Yard1 picture Yard1  路  3Comments

frederikfaye picture frederikfaye  路  5Comments

GuillemGSubies picture GuillemGSubies  路  3Comments

arose13 picture arose13  路  5Comments