python-brewer
python-brewer copied to clipboard
ImportError: cannot import name 'build_dist_index' from 'pipdeptree'
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)
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, 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.
pip uninstall pipdeptree
pip install pipdeptree==0.9.0
works for me