:: Re: [DNG] help with python error (S…
Pàgina inicial
Delete this message
Reply to this message
Autor: Marc Shapiro
Data:  
A: dng
Assumptes vells: Re: [DNG] help with python error
Assumpte: Re: [DNG] help with python error (SOLVED)
Actually that wasn't the problem, but thanks, anyway.

The final solution WAS to copy appdirs.py into my
/usr/lib/python3/dist-packages/ directory (copied from my Chimaera
installation, which was also the same as my Daedalus installation, into
my Excalibur installation).  This got me past the issue of not finding
appdirs and gave me the error shown below (in my prior post).  The
solution to that turned out to be in the typing_extensions package,
which was in /usr/lib/python3/dist-packages/ and ALSO in
~/.local/lib/python3.12/site-packages (about a month newer and 6 times
larger) which took precedence!  I eliminated that copy, keeping the one
in /usr/lib/python3/dist-packages and everything is working, again.

I still wish I could use pip to install globally, without a virtual
environment.  I used to be able to do it.  If I open a terminal with no
venv active, or even installed,and enter 'pip list' I get three screens
full of packages installed by pip that are not in a venv.  I hope I
never need to update them, since pip wont work any more outside of a
venv and I can't get anything to work inside of a venv.  I even tried to
install a package INSIDE an active venv and pip gave me the whole spiel
about being in an externally managed environment!

It seems like virtual environments should be easy to set up and use, but
they will not work on this box!

Marc


On 2/14/25 8:14 AM, Marc Shapiro wrote:
> Yes. Thanks.
>
> I tried to set up a venv for this project and had problems.  I tried a
> few things with no luck, so I copied appdirs.py from the venv to my
> dist-packages.  That is when this error came up.  If I rename the
> copied file then it goes back to the old error of not finding appdirs.
>
> I don't remember the exact error that I was getting with the venv, but
> I will remove and rebuild it and try again.
>
> Marc
>
> On 2/14/25 6:17 AM, Ludovic Bellière via Dng wrote:
>> That is what happen when you mix and match system packages and pip
>> packages:
>> eventually, something breaks.
>>
>> Something is FUBAR with (system) beautifulsoup and python 3.12. What?
>> Most
>> likely the packet on your system is too old for python3.12 and use a
>> deprecated
>> API.
>>
>> Possible Solution: use a venv
>>
>> If you are writing software: use a wrapper to activate the venv when the
>> software is called.
>>
>> On Thu, 13 Feb 2025, Marc Shapiro via Dng wrote:
>>
>>> I know that this is not, specifically, a Devuan issue, but can
>>> anyone help me with the following python error:
>>>
>>> Traceback (most recent call last):
>>>   File "/usr/local/bin/pyquotes-y", line 12, in <module>
>>>     import yfinance as yf
>>>   File
>>> "/usr/local/lib/python3.12/dist-packages/yfinance/__init__.py", line
>>> 23, in <module>
>>>     from .ticker import Ticker
>>>   File "/usr/local/lib/python3.12/dist-packages/yfinance/ticker.py",
>>> line 29, in <module>
>>>     from .base import TickerBase
>>>   File "/usr/local/lib/python3.12/dist-packages/yfinance/base.py",
>>> line 39, in <module>
>>>     from .data import YfData
>>>   File "/usr/local/lib/python3.12/dist-packages/yfinance/data.py",
>>> line 5, in <module>
>>>     from bs4 import BeautifulSoup
>>>   File "/usr/lib/python3/dist-packages/bs4/__init__.py", line 64, in
>>> <module>
>>>     from .builder import (
>>>   File "/usr/lib/python3/dist-packages/bs4/builder/__init__.py",
>>> line 24, in <module>
>>>     from bs4.element import (
>>>   File "/usr/lib/python3/dist-packages/bs4/element.py", line 9, in
>>> <module>
>>>     from bs4.css import CSS
>>>   File "/usr/lib/python3/dist-packages/bs4/css.py", line 27, in
>>> <module>
>>>     from bs4._typing import _NamespaceMapping
>>>   File "/usr/lib/python3/dist-packages/bs4/_typing.py", line 16, in
>>> <module>
>>>     from typing_extensions import (
>>>   File
>>> "/home/marc/.local/lib/python3.12/site-packages/typing_extensions.py",
>>> line 1167, in <module>
>>>     class TypeVar(typing.TypeVar, _DefaultMixin, _root=True):
>>> TypeError: type 'typing.TypeVar' is not an acceptable base type
>>>
>>>
>>> It seems to be a problem in typing_extensions.py.  Is it actually a
>>> bug there, or am I missing something somewhere else? Does something
>>> need to be upgraded?
>>>
>>> Marc
>>>
>>> _______________________________________________
>>> Dng mailing list
>>> Dng@???
>>> Manage your subscription:
>>> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>>> Archive: https://lists.dyne.org/lurker/list/dng.en.html
>>