error message recommending incorrect setting of PYTHONPATH
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Low
|
Martin Pool |
Bug Description
An error message tells the user to set PYTHONPATH to contain the bzrlib directory. That value does not function. The correct setting of PYTHONPATH is so that it contains the directory containing the bzrlib directory.
To reproduce, extract a bzr archive. In this example, to /usr/local/Bazaar
Hard link the bzr to a bin directory in PATH. As in
$ ln /usr/local/
Run a bzr command.
$ bzr init-repo
bzr: ERROR: Couldn't import bzrlib and dependencies.
Please check bzrlib is on your PYTHONPATH.
Traceback (most recent call last):
File "/usr/local/
import bzrlib
ImportError: No module named bzrlib
This error occurs even when PYTHONPATH is set to the bzrlib directory, as
export PYTHONPATH=
Changed in bzr: | |
status: | Confirmed → Fix Committed |
Changed in bzr: | |
status: | Fix Committed → Fix Released |
The PYTHONPATH should not be set to the actual bzrlib directory. Python looks for a file bzrlib.py OR a directory named bzrlib/ (usually containing a __init__.py) INSIDE the PYTHONPATH. Clearly it doesn't find such a thing. The following should work: /usr/local/ Bazaar
export PYTHONPATH=