[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to report bugs? (reportbug broken)



Okay, I couldn't figure out how to change the the order of paths in
`sys.path`, but I went ahead and removed
```
pip3 uninstall pysimplesoap
```
from `~/.local/`. I have no idea what was the difference between my
locally installed version and the system version but reportbug works
now.

Thanks everyone, cheers,
Nico

On Wed, May 22, 2019 at 7:33 PM Michael Lange <klappnase@freenet.de> wrote:
>
> On Wed, 22 May 2019 19:04:52 +0200
> Nico Schlömer <nico.schloemer@gmail.com> wrote:
>
> > Thanks Michael for the quick response!
> > ```
> > python3 -c "import sys; print(sys.path)"
> > ```
> > gives
> > ```
> > ['', '/usr/lib/python37.zip', '/usr/lib/python3.7',
> > '/usr/lib/python3.7/lib-dynload',
> > '/home/nschloe/.local/lib/python3.7/site-packages',
> > '/usr/local/lib/python3.7/dist-packages',
> > '/usr/lib/python3/dist-packages']
> > ```
> > Looks normal?
>
> Actually not, '/usr/lib/python3/dist-packages' should appear
> before '/home/nschloe/.local/lib/python3.7/site-packages' (resp. your
> custom Python should be at the very end of sys.path). Obviously this is
> the reason why reportbug tries to import some module from your custom
> Python3 install which refuses to work. You should definitely fix this,
> otherwise the next bad surprise will be waiting just around the corner ;)
>
> I am not sure how to do this properly, though. Maybe the Python-path is
> somehow created from $PATH, is your ~/.local somewhere in $PATH and could
> you possibly move it to the end?
>
> According to
> https://stackoverflow.com/questions/18247333/python-pythonpath-in-linux
> you could also try to set the PYTHONPATH environment variable with
> something like
> export
> PYTHONPATH="":/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3/dist-packages:
> (etc.)
>
> however I am not sure if this is actually wise (Python2 should also be
> taken into account of course).
>
> As a quick-and-dirty workaround you could try to add something like
>
> import sys
> sys.path = ['', '/usr/lib/python37.zip', '/usr/lib/python3.7',
> '/usr/lib/python3.7/lib-dynload',
> '/usr/local/lib/python3.7/dist-packages',
> '/usr/lib/python3/dist-packages']
>
> to the very beginning of /usr/bin/reportbug .
> This wouldn't help with other misbehaving Python3 programs of course.
>
> Regards
>
> Michael
>
> .-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.
>
> Our way is peace.
>                 -- Septimus, the Son Worshiper, "Bread and Circuses",
>                    stardate 4040.7.
>


Reply to: