python-brewer icon indicating copy to clipboard operation
python-brewer copied to clipboard

ImportError: cannot import name 'build_dist_index' from 'pipdeptree'

Open bradleyjames opened this issue 4 years ago • 3 comments

In a new venv I'm unable to run python-brewer successfully with python 3.9.6. With the example from the README I receive the following:

$ cd "$(mktemp -d)"
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install python-brewer
$ pybrew \
    -n "Statik" \
    -d "Python-based, generic static web site generator aimed at developers" \
    -H https://getstatik.com \
    -g https://github.com/thanethomson/statik.git \
    -r https://github.com/thanethomson/statik/archive/v0.14.2.tar.gz \
    statik \
    statik.rb
Traceback (most recent call last):
  File "/usr/local/bin/pybrew", line 5, in <module>
    from pythonbrewer.cmdline import main
  File "/usr/local/lib/python3.9/site-packages/pythonbrewer/__init__.py", line 4, in <module>
    from pythonbrewer.deplist import *
  File "/usr/local/lib/python3.9/site-packages/pythonbrewer/deplist.py", line 6, in <module>
    from pipdeptree import build_dist_index, construct_tree, sorted_tree
ImportError: cannot import name 'build_dist_index' from 'pipdeptree' (/usr/local/lib/python3.9/site-packages/pipdeptree.py)

bradleyjames avatar Jul 07 '21 00:07 bradleyjames

It's an old project with the last commit in 2018. But if you're interested my MR solves an issue with the import error, caused by wrong dependency to pipdeptree.

shmygol avatar Aug 15 '21 19:08 shmygol

@shmygol, thanks. Is there a project for python that is either more widely used or up to date? Most of the python homebrew tools I’ve found have one problem or another.

bradleyjames avatar Aug 23 '21 02:08 bradleyjames

pip uninstall pipdeptree
pip install pipdeptree==0.9.0

works for me

swim2sun avatar Jan 12 '22 08:01 swim2sun