Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7510351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:12:25+00:00 2026-05-29T23:12:25+00:00

Can someone tell me what I’m doing wrong to package this as a module:

  • 0

Can someone tell me what I’m doing wrong to package this as a module:
https://github.com/xamox/python-zxing.

My setup.py is as follows:

#!/usr/bin/env python

from distutils.core import setup

setup(
    name='zxing',
    version='0.1',
    description="wrapper for zebra crossing (zxing) barcode library",
    url='http://simplecv.org',
    author='Ingenuitas',
    author_email='public.relations@ingenuitas.com',
    packages=['zxing'],
)

I am trying to do “import zxing”. I do setup.py install, puts it in /usr/local/lib/python2.7/dist-packages/, but import zxing doesn’t work.

I get the following error:

In [1]: import zxing.zxing
---------------------------------------------------------------------------
ResolutionError                           Traceback (most recent call last)
/home/xamox/<ipython-input-1-9ff7d0755c55> in <module>()
----> 1 import zxing.zxing

/usr/local/bin/zxing.py in <module>()
      3 __requires__ = 'zxing==0.1'
      4 import pkg_resources
----> 5 pkg_resources.run_script('zxing==0.1', 'zxing.py')

/usr/lib/python2.7/dist-packages/pkg_resources.pyc in run_script(self, requires, script_name)
    465         ns.clear()
    466         ns['__name__'] = name
--> 467         self.require(requires)[0].run_script(script_name, ns)
    468 
    469 

/usr/lib/python2.7/dist-packages/pkg_resources.pyc in run_script(self, script_name, namespace)
   1192         script = 'scripts/'+script_name
   1193         if not self.has_metadata(script):
-> 1194             raise ResolutionError("No script named %r" % script_name)
   1195         script_text = self.get_metadata(script).replace('\r\n','\n')
   1196         script_text = script_text.replace('\r','\n')

ResolutionError: No script named 'zxing.py'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T23:12:25+00:00Added an answer on May 29, 2026 at 11:12 pm

    Have a look in the stack trace whose URL you showed in a comment:

    /usr/local/bin/zxing.py in <module>()
          3 __requires__ = 'zxing==0.1'
          4 import pkg_resources
    ----> 5 pkg_resources.run_script('zxing==0.1', 'zxing.py')
    

    That indicates that it is trying to load some guff from /usr/local/bin/zxing.py which contains code that’s not in your current version e.g. “import pkg_resources”. Looks like debris from a previous experiment. Get rid of it.

    Now that you have a clean deck:

    It seems rather pointless having an empty __init__.py and a one-source-file package. I suggest that you delete the __init__.py and remove all traces of other experiments (especially “build” directories). If there is a folder /usr/local/lib/python2.7/dist-packages/zxing, remove it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone tell what is wrong with this query? sqltext = SELECT utyp, count(*)
Can someone tell me what's wrong with this http://jsfiddle.net/Yp8Bz/ ? It works fine in
Can someone tell me what's wrong with this code? I'm trying to upload a
can someone tell me what i am doing wrong here.. i am not getting
Can someone tell me whats going wrong in this code! testit :- read(Term1), read(Term2),
Can someone tell me exactly what is this regex doing? new StringTokenizer(string,:/.@\\;,+ ); I
Can someone tell me what i am doing wrong here? I want the boxes
Can someone tell me how to change directories using FtpWebRequest? This seems like it
Can someone tell me what the code equivelant in VB.Net to this C# code
Can someone tell me why this processes all the files and then does it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.