3

I'm playing around with PyBuilder and I must be either missing something, or misunderstanding how PyBuilder works. In my test application, I'm importing the pdfrw library. I had installed it via pip and everything was working fine. However, I decided to try starting over in a new venv and not installing via pip first to see if PyBuilder pulled in the dependency. When I run pyb it runs fine, no errors, but when I try to run the code from the target directory it gives me an error of "ModuleNotFoundError: No module named pdfrw".

I'm used to using Maven and Gradle for Java development but this is my first foray into dependency management for Python. Can anyone let me know if I'm just misunderstanding what PyBuilder can do or if I'm just missing something in the configuration? Here's a copy of the simple build.py script that pyb is referencing:

from pybuilder.core import init, use_plugin

use_plugin("python.core")
use_plugin("python.install_dependencies")

default_task = "publish"


@init
def initialize(project):
    project.depends_on('pdfrw')

Any help would be greatly appreciated.

Thanks,

Chris

Chris Slack
  • 265
  • 3
  • 12

1 Answers1

0

Try to use

pyb install_dependencies

According to http://pybuilder.github.io/documentation/tutorial.html#WritingUnitTests

Pang
  • 9,564
  • 146
  • 81
  • 122
Kevin
  • 1