Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

342
Views
find_packages doesn't find my Python file

I have a directory tree like this:

dir/
    A/
        __init__.py
        something.py

I used find_packages on dir/A and expected it to find something.py. However, it returned an empty list. How do I make find_packages find something.py as a package?

from setuptools import find_packages

packages = find_packages('c:/dir/A')
print(packages)
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You'd need to make it a package, it's a module right now. You would do this the same way you made the A package: create a directory with the package name, include an __init__.py file (in this case, you would rename something.py to __init__.py under the something directory).

find_packages('c:/dir') would find A, since A is a package under c:/dir.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!