:: Re: [DNG] help with python error (S…
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Ludovic Bellière
日付:  
To: dng
題目: Re: [DNG] help with python error (SOLVED)
The point of using a virtual environment is so that dependencies don't override
whatever exists on the system. It seems to me that you don't understand how it
all works.

When you install something in a venv, pip will pull dependencies of that thing,
then dependencies of those dependencies. All that will only be accessible from
within the 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!


This tells me that you didn't activate the venv and pip recognized that the
operation would install system-wide. So it stopped you doing something stupid.

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


They are. I use them nearly every day. To activate a venv, you need to source
`venv/bin/activate`. It is a bash script that changes the environment variables
to ensure that the libraries and software present in the virtual environment are
prefered over the system's. It won't stop whatever tool you use to reach the
system's libraries if none exists within the venv.

The way you solved your issue is so convoluted, it boggle my minds it even
worked at all. It's a sure way to have something bite your ass in a few months
or years.

Anyhow, if it works...

Cheers,
                 Ludovic