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

Incorrectly installed package #21

Open
lschwetlick opened this issue Jan 30, 2018 · 7 comments
Open

Incorrectly installed package #21

lschwetlick opened this issue Jan 30, 2018 · 7 comments

Comments

@lschwetlick
Copy link

When installing zbarlight using pip, I get the following error, that I have been unable to find any information about. I use MacOS, Python3 and pip3.
I followed the install procedure, i.e. zbar was installed via homebrew.
The pip install of zbarlight finishes the install with this warning:

Running setup.py (path:/private/var/folders/gk/07t7dq7n01v45sj7k8295dqc0000gn/T/pip-build-di27kndu/zbarlight/setup.py) egg_info for package zbarlight produced metadata for project name unknown. Fix your #egg=zbarlight fragments.

The package is also not listed as zbarlight but as UNKNOWN in my pip list. It also doesnt show any documentation using "pip show".
When I install directly from source (download zip, then run setup.py) the same error occurs.

I can import the module in python (as zbarlight, not as UNKNOWN), but the command "zbarlight.scan_codes('qrcode', image)" gives the error

AttributeError: module 'zbarlight' has no attribute 'scan_codes'

Is there a known solution to this problem?

This is the verbose output of the pip install:

Collecting zbarlight
  1 location(s) to search for versions of zbarlight:
  * https://pypi.python.org/simple/zbarlight/
  Getting page https://pypi.python.org/simple/zbarlight/
  Looking up "https://pypi.python.org/simple/zbarlight/" in the cache
  Current age based on date: 107
  Freshness lifetime from max-age: 600
  Freshness lifetime from request max-age: 600
  The response is "fresh", returning cached response
  600 > 107
  Analyzing links from page https://pypi.python.org/simple/zbarlight/
    Found link https://pypi.python.org/packages/2d/9b/e987d8b983b463e96169260585a2828ad10fd932523460f2322d07fdeccf/zbarlight-2.0.tar.gz#md5=04adbbfa49c65885584c0063f347d728 (from https://pypi.python.org/simple/zbarlight/), version: 2.0
    Found link https://pypi.python.org/packages/43/e2/429cd76e049285b9a53e40c813826307f19f0be6562dfb948332cdeb9615/zbarlight-1.2.tar.gz#md5=66a573d065ec42c1c80a767b6d05bbbf (from https://pypi.python.org/simple/zbarlight/), version: 1.2
    Found link https://pypi.python.org/packages/58/21/af35efb01959ce9be2a6c14e25260530657456b3e914fbc8bf0c16d79c2d/zbarlight-0.1.1.tar.gz#md5=5bc8147eb6464041d82589e37f02b38e (from https://pypi.python.org/simple/zbarlight/), version: 0.1.1
    Found link https://pypi.python.org/packages/a2/29/7a1cd98a5e2098623a24f8853514607f68ff376b263101b7276bc8179221/zbarlight-1.0.0.tar.gz#md5=580728bbaf0a0838f5667264b90e4254 (from https://pypi.python.org/simple/zbarlight/), version: 1.0.0
    Found link https://pypi.python.org/packages/a3/92/743e2aafa1b025a1f65d74411be617e900a45e3ba6962e43565c8ab08d15/zbarlight-0.1.0.tar.gz#md5=825c79c7e9ed61b7af2ca28f91f74f3c (from https://pypi.python.org/simple/zbarlight/), version: 0.1.0
    Found link https://pypi.python.org/packages/a4/4a/42e4760e882a8c71350002b3356aaff8d1a5e335030610913a2457351d42/zbarlight-1.0.2.tar.gz#md5=1e78e3ec69aaf251491373137d490010 (from https://pypi.python.org/simple/zbarlight/), version: 1.0.2
    Found link https://pypi.python.org/packages/da/cc/2490f49f5ba7be2034ebf33ba48b7ccb1bbb53e706b1c79d2c6504439bee/zbarlight-1.0.1.tar.gz#md5=fa31a575f5e8a3f6de0b9b6f93e0020a (from https://pypi.python.org/simple/zbarlight/), version: 1.0.1
    Found link https://pypi.python.org/packages/f8/cc/941f0e91fd3ab61e59cb84bd4b13063b658de04d58acc7857b66010cf166/zbarlight-1.1.0.tar.gz#md5=1ea8daea1758f342b71a126b13a54baf (from https://pypi.python.org/simple/zbarlight/), version: 1.1.0
  Using version 2.0 (newest of versions: 0.1.0, 0.1.1, 1.0.0, 1.0.1, 1.0.2, 1.1.0, 1.2, 2.0)
  Looking up "https://pypi.python.org/packages/2d/9b/e987d8b983b463e96169260585a2828ad10fd932523460f2322d07fdeccf/zbarlight-2.0.tar.gz" in the cache
  Current age based on date: 7016
  Freshness lifetime from max-age: 31557600
  The response is "fresh", returning cached response
  31557600 > 7016
  Using cached zbarlight-2.0.tar.gz
  Downloading from URL https://pypi.python.org/packages/2d/9b/e987d8b983b463e96169260585a2828ad10fd932523460f2322d07fdeccf/zbarlight-2.0.tar.gz#md5=04adbbfa49c65885584c0063f347d728 (from https://pypi.python.org/simple/zbarlight/)
  Running setup.py (path:/private/var/folders/gk/07t7dq7n01v45sj7k8295dqc0000gn/T/pip-build-di27kndu/zbarlight/setup.py) egg_info for package zbarlight
    Running command python setup.py egg_info
    /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
    warning: no files found matching '*' under directory 'setuptools/_vendor'

    Installed /private/var/folders/gk/07t7dq7n01v45sj7k8295dqc0000gn/T/pip-build-di27kndu/zbarlight/.eggs/setuptools-38.4.0-py3.6.egg
    running egg_info
    creating pip-egg-info/UNKNOWN.egg-info
    writing pip-egg-info/UNKNOWN.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/UNKNOWN.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/UNKNOWN.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/UNKNOWN.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'pip-egg-info/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 'pip-egg-info/UNKNOWN.egg-info/SOURCES.txt'
  Running setup.py (path:/private/var/folders/gk/07t7dq7n01v45sj7k8295dqc0000gn/T/pip-build-di27kndu/zbarlight/setup.py) egg_info for package zbarlight produced metadata for project name unknown. Fix your #egg=zbarlight fragments.
  Source in /private/var/folders/gk/07t7dq7n01v45sj7k8295dqc0000gn/T/pip-build-di27kndu/zbarlight has version 0.0.0, which satisfies requirement unknown from https://pypi.python.org/packages/2d/9b/e987d8b983b463e96169260585a2828ad10fd932523460f2322d07fdeccf/zbarlight-2.0.tar.gz#md5=04adbbfa49c65885584c0063f347d728
  Requirement already satisfied (use --upgrade to upgrade): unknown from https://pypi.python.org/packages/2d/9b/e987d8b983b463e96169260585a2828ad10fd932523460f2322d07fdeccf/zbarlight-2.0.tar.gz#md5=04adbbfa49c65885584c0063f347d728 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
Cleaning up...
  Removing source in /private/var/folders/gk/07t7dq7n01v45sj7k8295dqc0000gn/T/pip-build-di27kndu/zbarlight
@lschwetlick lschwetlick changed the title pip incorrectly installs package Incorrectly installed package Jan 30, 2018
@fbochu
Copy link
Contributor

fbochu commented Feb 1, 2018

Hi, thanks for the report.

Which version of setuptools and pip do you use ? The package is only compatible with setuptools >= 30.3.

@nasaWelder
Copy link

I got similiar error on ubuntu mate:
devarea@devarea-Inspiron-1545:~$ pip install zbarlight
Collecting zbarlight
Using cached zbarlight-2.0.tar.gz
Running setup.py (path:/tmp/pip-build-wT2_BT/zbarlight/setup.py) egg_info for package zbarlight produced metadata for project name unknown. Fix your #egg=zbarlight fragments.
Building wheels for collected packages: unknown, unknown
Running setup.py bdist_wheel for unknown ... done
Stored in directory: /home/devarea/.cache/pip/wheels/d2/a4/82/d10c001eb84dd52671c566faf6c4be598094edf7617c1e6661
Running setup.py bdist_wheel for unknown ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-wT2_BT/unknown/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" bdist_wheel -d /tmp/tmpIKHjccpip-wheel- --python-tag cp27:
Traceback (most recent call last):
File "", line 1, in
IOError: [Errno 2] No such file or directory: '/tmp/pip-build-wT2_BT/unknown/setup.py'


Failed building wheel for unknown
Running setup.py clean for unknown
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-wT2_BT/unknown/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" clean --all:
Traceback (most recent call last):
File "", line 1, in
IOError: [Errno 2] No such file or directory: '/tmp/pip-build-wT2_BT/unknown/setup.py'


Failed cleaning build dir for unknown
Successfully built unknown
Failed to build unknown
Installing collected packages: unknown
Successfully installed unknown-0.0.0
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
devarea@devarea-Inspiron-1545:$ pip install --upgrade pip
Collecting pip
Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 626kB/s
Installing collected packages: pip
Successfully installed pip-9.0.1
devarea@devarea-Inspiron-1545:
$ pip install zbarlight
Collecting zbarlight
Installing collected packages: zbarlight
Exception:
Traceback (most recent call last):
File "/home/devarea/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/devarea/.local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/home/devarea/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/home/devarea/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/home/devarea/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/home/devarea/.local/lib/python2.7/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/home/devarea/.local/lib/python2.7/site-packages/pip/wheel.py", line 316, in clobber
ensure_dir(destdir)
File "/home/devarea/.local/lib/python2.7/site-packages/pip/utils/init.py", line 83, in ensure_dir
os.makedirs(path)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/pyth

@nasaWelder
Copy link

Fix for me:
sudo -H pip3 install setuptools --upgrade
sudo -H pipe install zbarlight

@fbochu
Copy link
Contributor

fbochu commented Feb 5, 2018

Unless it's a blocking issue for one of you (or any other zbarlight user), I do not reconsider moving to setup.cfg (that's why zbarlight needs setuptools> = 30.3).

@fbochu fbochu added the wontfix label Feb 5, 2018
@bilelmoussaoui
Copy link

I'm having the same issue here. I'm using zbarlight to scan qrcodes on a Gtk Application. I have built zbar with those options


         "--without-qt",
         "--without-gtk",
         "--without-imagemagick",
         "--disable-video"

And built zbarlight with setuptools 38.2.5.
Is there anything I can do to debug this?
In /include I have zbar and zbar.h...
Somehow, I don't have the init.py file in site-packages/zbarlight/

@fbochu
Copy link
Contributor

fbochu commented May 17, 2018

Sorry for the time of response, I think that Python only search includes in /usr/include by default. You can use envvars to set your compiler search path. Without the stack trace I can not help you more.

@rotemreiss
Copy link

Fix for me:
sudo -H pip3 install setuptools --upgrade
sudo -H pipe install zbarlight

There's a typo on the 2nd command. This should be:
sudo -H pip3 install zbarlight

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

5 participants