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

i can't setup ,please help me,thks #27

Closed
desireYY opened this issue Sep 20, 2018 · 5 comments
Closed

i can't setup ,please help me,thks #27

desireYY opened this issue Sep 20, 2018 · 5 comments

Comments

@desireYY
Copy link

desires-MacBook-Pro:~ desire$ cd /Users/desire/Downloads/zbarlight-master/
desires-MacBook-Pro:zbarlight-master desire$ python setup.py install
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/extension.py:133: UserWarning: Unknown Extension options: 'optional'
  warnings.warn(msg)
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
  warnings.warn(msg)
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'project_urls'
  warnings.warn(msg)
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
  warnings.warn(msg)

Installed /Users/desire/Downloads/zbarlight-master/.eggs/setuptools-40.4.1-py2.7.egg
running install
Checking .pth file support in /Library/Python/2.7/site-packages/
/usr/bin/python -E -c pass
TEST PASSED: /Library/Python/2.7/site-packages/ appears to support .pth files
running bdist_egg
running egg_info
creating src/UNKNOWN.egg-info
writing src/UNKNOWN.egg-info/PKG-INFO
writing top-level names to src/UNKNOWN.egg-info/top_level.txt
writing dependency_links to src/UNKNOWN.egg-info/dependency_links.txt
writing manifest file 'src/UNKNOWN.egg-info/SOURCES.txt'
reading manifest file 'src/UNKNOWN.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs'
no previously-included directories found matching 'tests'
warning: no previously-included files matching '*.py[cod]' found anywhere in distribution
warning: no previously-included files matching '__pycache__' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files found matching 'Makefile'
warning: no previously-included files found matching 'requirements-dev.txt'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'run.py'
writing manifest file 'src/UNKNOWN.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.13-intel/egg
running install_lib
running build_ext
building 'zbarlight._zbarlight' extension
creating build
creating build/temp.macosx-10.13-intel-2.7
creating build/temp.macosx-10.13-intel-2.7/src
creating build/temp.macosx-10.13-intel-2.7/src/zbarlight
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/zbarlight/_zbarlight.c -o build/temp.macosx-10.13-intel-2.7/src/zbarlight/_zbarlight.o -std=c99
src/zbarlight/_zbarlight.c:82:26: warning: implicit conversion loses integer
      precision: 'Py_ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
    symbologies.number = PyList_Size(python_symbologies);
                       ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/zbarlight/_zbarlight.c:85:37: warning: implicit conversion loses integer
      precision: 'long' to 'int' [-Wshorten-64-to-32]
        symbologies.symbologie[i] = PyLong_AsLong(obj);
                                  ~ ^~~~~~~~~~~~~~~~~~
2 warnings generated.
creating build/lib.macosx-10.13-intel-2.7
creating build/lib.macosx-10.13-intel-2.7/zbarlight
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.13-intel-2.7/src/zbarlight/_zbarlight.o -lzbar -o build/lib.macosx-10.13-intel-2.7/zbarlight/_zbarlight.so
ld: warning: ignoring file /usr/local/lib/libzbar.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libzbar.dylib
creating build/bdist.macosx-10.13-intel
creating build/bdist.macosx-10.13-intel/egg
creating build/bdist.macosx-10.13-intel/egg/zbarlight
copying build/lib.macosx-10.13-intel-2.7/zbarlight/_zbarlight.so -> build/bdist.macosx-10.13-intel/egg/zbarlight
creating stub loader for zbarlight/_zbarlight.so
byte-compiling build/bdist.macosx-10.13-intel/egg/zbarlight/_zbarlight.py to _zbarlight.pyc
creating build/bdist.macosx-10.13-intel/egg/EGG-INFO
copying src/UNKNOWN.egg-info/PKG-INFO -> build/bdist.macosx-10.13-intel/egg/EGG-INFO
copying src/UNKNOWN.egg-info/SOURCES.txt -> build/bdist.macosx-10.13-intel/egg/EGG-INFO
copying src/UNKNOWN.egg-info/dependency_links.txt -> build/bdist.macosx-10.13-intel/egg/EGG-INFO
copying src/UNKNOWN.egg-info/top_level.txt -> build/bdist.macosx-10.13-intel/egg/EGG-INFO
writing build/bdist.macosx-10.13-intel/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/UNKNOWN-0.0.0-py2.7-macosx-10.13-intel.egg' and adding 'build/bdist.macosx-10.13-intel/egg' to it
removing 'build/bdist.macosx-10.13-intel/egg' (and everything under it)
Processing UNKNOWN-0.0.0-py2.7-macosx-10.13-intel.egg
Copying UNKNOWN-0.0.0-py2.7-macosx-10.13-intel.egg to /Library/Python/2.7/site-packages
Adding UNKNOWN 0.0.0 to easy-install.pth file
error: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/easy-install.pth'
@desireYY desireYY changed the title i can't setup ,please help me i can't setup ,please help me,thks Sep 20, 2018
@xordoquy
Copy link

xordoquy commented Sep 20, 2018

It looks like you don't have the permission to write to the Python's site-package:

Permission denied: '/Library/Python/2.7/site-packages/easy-install.pth'

A good practice is to setup a virtual environment. Alternatively run the installation as superuser - by using sudo for example.

@desireYY
Copy link
Author

desireYY commented Sep 21, 2018

看起来您没有写入 Python 的 site-package 的权限:

权限被拒绝:'/ Library /Python/2.7/site-packages/easy-install.pth'

一个好的做法是设置虚拟环境。或者以超级用户身份运行安装 - 例如使用 sudo。

i use sudo ,but still can't setup

`
desires-MacBook-Pro:~ desire$ cd /Users/desire/Downloads/zbarlight-master\ 2
desires-MacBook-Pro:zbarlight-master 2 desire$ ls
Changelog.rst docs src
LICENSE requirements-dev.txt tests
MANIFEST.in run.py tox.ini
Makefile setup.cfg
README.rst setup.py
desires-MacBook-Pro:zbarlight-master 2 desire$ sudo python setup.py install
Password:
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/extension.py:133: UserWarning: Unknown Extension options: 'optional'
warnings.warn(msg)
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'project_urls'
warnings.warn(msg)
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)

Installed /Users/desire/Downloads/zbarlight-master 2/.eggs/setuptools-40.4.1-py2.7.egg
running install
Checking .pth file support in /Library/Python/2.7/site-packages/
/usr/bin/python -E -c pass
TEST PASSED: /Library/Python/2.7/site-packages/ appears to support .pth files
running bdist_egg
running egg_info
creating src/UNKNOWN.egg-info
writing src/UNKNOWN.egg-info/PKG-INFO
writing top-level names to src/UNKNOWN.egg-info/top_level.txt
writing dependency_links to src/UNKNOWN.egg-info/dependency_links.txt
writing manifest file 'src/UNKNOWN.egg-info/SOURCES.txt'
reading manifest file 'src/UNKNOWN.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs'
no previously-included directories found matching 'tests'
warning: no previously-included files matching '.py[cod]' found anywhere in distribution
warning: no previously-included files matching 'pycache' found anywhere in distribution
warning: no previously-included files matching '
.so' found anywhere in distribution
warning: no previously-included files found matching 'Makefile'
warning: no previously-included files found matching 'requirements-dev.txt'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'run.py'
writing manifest file 'src/UNKNOWN.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.13-intel/egg
running install_lib
running build_ext
building 'zbarlight._zbarlight' extension
creating build
creating build/temp.macosx-10.13-intel-2.7
creating build/temp.macosx-10.13-intel-2.7/src
creating build/temp.macosx-10.13-intel-2.7/src/zbarlight
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/zbarlight/_zbarlight.c -o build/temp.macosx-10.13-intel-2.7/src/zbarlight/_zbarlight.o -std=c99
src/zbarlight/_zbarlight.c:82:26: warning: implicit conversion loses integer
precision: 'Py_ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
symbologies.number = PyList_Size(python_symbologies);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/zbarlight/_zbarlight.c:85:37: warning: implicit conversion loses integer
precision: 'long' to 'int' [-Wshorten-64-to-32]
symbologies.symbologie[i] = PyLong_AsLong(obj);
~ ^~~~~~~~~~~~~~~~~~
2 warnings generated.
creating build/lib.macosx-10.13-intel-2.7
creating build/lib.macosx-10.13-intel-2.7/zbarlight
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.13-intel-2.7/src/zbarlight/_zbarlight.o -lzbar -o build/lib.macosx-10.13-intel-2.7/zbarlight/_zbarlight.so
ld: warning: ignoring file /usr/local/lib/libzbar.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libzbar.dylib
creating build/bdist.macosx-10.13-intel
creating build/bdist.macosx-10.13-intel/egg
creating build/bdist.macosx-10.13-intel/egg/zbarlight
copying build/lib.macosx-10.13-intel-2.7/zbarlight/_zbarlight.so -> build/bdist.macosx-10.13-intel/egg/zbarlight
creating stub loader for zbarlight/_zbarlight.so
byte-compiling build/bdist.macosx-10.13-intel/egg/zbarlight/_zbarlight.py to _zbarlight.pyc
creating build/bdist.macosx-10.13-intel/egg/EGG-INFO
copying src/UNKNOWN.egg-info/PKG-INFO -> build/bdist.macosx-10.13-intel/egg/EGG-INFO
copying src/UNKNOWN.egg-info/SOURCES.txt -> build/bdist.macosx-10.13-intel/egg/EGG-INFO
copying src/UNKNOWN.egg-info/dependency_links.txt -> build/bdist.macosx-10.13-intel/egg/EGG-INFO
copying src/UNKNOWN.egg-info/top_level.txt -> build/bdist.macosx-10.13-intel/egg/EGG-INFO
writing build/bdist.macosx-10.13-intel/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/UNKNOWN-0.0.0-py2.7-macosx-10.13-intel.egg' and adding 'build/bdist.macosx-10.13-intel/egg' to it
removing 'build/bdist.macosx-10.13-intel/egg' (and everything under it)
Processing UNKNOWN-0.0.0-py2.7-macosx-10.13-intel.egg
Removing /Library/Python/2.7/site-packages/UNKNOWN-0.0.0-py2.7-macosx-10.13-intel.egg
Copying UNKNOWN-0.0.0-py2.7-macosx-10.13-intel.egg to /Library/Python/2.7/site-packages
UNKNOWN 0.0.0 is already the active version in easy-install.pth

Installed /Library/Python/2.7/site-packages/UNKNOWN-0.0.0-py2.7-macosx-10.13-intel.egg
Processing dependencies for UNKNOWN==0.0.0
Finished processing dependencies for UNKNOWN==0.0.0
desires-MacBook-Pro:zbarlight-master 2 desire$ python
Python 2.7.10 (default, Oct 6 2017, 22:29:07)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import zbarlight
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named zbarlight
`

@desireYY
Copy link
Author

when i use pip steup, still fail

@fbochu
Copy link
Contributor

fbochu commented Sep 25, 2018

It seem to be a similar issue that #21. In your logs, we see that package zbarlight produced metadata for project name unknwon which is a sign that our setuptools version is too old (zbarligth is only compatible with setuptools 30.3+).

@fbochu
Copy link
Contributor

fbochu commented Jan 21, 2019

I close this problem as a duplicate of # 21. Be free to reopen it if it is not the case.

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

No branches or pull requests

3 participants