Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "/usr/lib/python2.7/distutils/dist.py:267 UserWarning: Unknown distribution option: 'install_requires'" #49

Closed
ghuls opened this issue Jul 28, 2014 · 4 comments

Comments

@ghuls
Copy link
Contributor

ghuls commented Jul 28, 2014

As mentioned on http://pythonhosted.org/distribute/, distribute is deprecated:

Distribute is a deprecated fork of the Setuptools project.

Since the Setuptools 0.7 release, Setuptools and Distribute have merged and
Distribute is no longer being maintained. All ongoing effort should reference the
Setuptools project and the Setuptools documentation.

By using setuptools instead of distutils, the "/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'" warning disappears:

$ python setup.py build
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running build
running build_py
running build_ext
building 'MACS2.cProb' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/MACS2
...
$ git diff setup.py
diff --git a/setup.py b/setup.py
index 3044be4..714d3ac 100644
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@ the distribution).

 import os
 import sys
-from distutils.core import setup, Extension
+from setuptools import setup, Extension

 # Use build_ext from Cython if found
 command_classes = {}
@ghuls ghuls changed the title Fix "/usr/lib/python2.7/distutils/dist.py:267 " UserWarning: Unknown distribution option: 'install_requires' Fix "/usr/lib/python2.7/distutils/dist.py:267 UserWarning: Unknown distribution option: 'install_requires'" Jul 28, 2014
taoliu added a commit that referenced this issue Oct 23, 2014
@taoliu
Copy link
Contributor

taoliu commented Oct 23, 2014

Fixed in 07d09ad. Thanks!

@leonmex
Copy link

leonmex commented Mar 25, 2017

try to install the python-tools
sudo apt-get install python-setuptools

@darkn3rd
Copy link

I did the following command: apt-get -yqqf install python-setuptools && easy_install pip && pip install --upgrade pip setuptools

And I got this output:

Running pip-9.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-dzZuxn/pip-9.0.1/egg-dist-tmp-H5oyYo
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
  warnings.warn(msg)
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.mailmap'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching '.landscape.yml'
warning: no previously-included files found matching 'pip/_vendor/Makefile'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'dev-requirements.txt'
warning: no previously-included files found matching 'appveyor.yml'
no previously-included directories found matching '.github'
no previously-included directories found matching '.travis'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'contrib'
no previously-included directories found matching 'tasks'
no previously-included directories found matching 'tests'

@bensalahmara
Copy link

hi
im facing th same error im trying to installe the setup.py :
/content/gdrive/My Drive/project_folder2/deepgaze
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'include_package_data'
warnings.warn(msg)
running install
running build
running build_py
running install_lib
creating /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/motion_tracking.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/saliency_map.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/face_landmark_detection.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/face_detection.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/color_classification.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/bayes_filter.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/cnn_head_pose_estimator.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/init.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/mask_analysis.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/haar_cascade.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/head_pose_estimation.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/motion_detection.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
copying build/lib.linux-x86_64-2.7/deepgaze/color_detection.py -> /usr/local/lib/python2.7/dist-packages/deepgaze
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/motion_tracking.py to motion_tracking.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/saliency_map.py to saliency_map.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/face_landmark_detection.py to face_landmark_detection.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/face_detection.py to face_detection.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/color_classification.py to color_classification.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/bayes_filter.py to bayes_filter.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/cnn_head_pose_estimator.py to cnn_head_pose_estimator.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/init.py to init.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/mask_analysis.py to mask_analysis.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/haar_cascade.py to haar_cascade.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/head_pose_estimation.py to head_pose_estimation.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/motion_detection.py to motion_detection.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/deepgaze/color_detection.py to color_detection.pyc
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/deepgaze-0.1.egg-info
can any one help me to sole this problem
thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants