Trouble getting started with Eric and pyenv
Detlev Offenbach
detlev at die-offenbachs.de
Mon May 18 16:06:31 BST 2020
Hi,
pyenv is messing with the PATH environment variable. This can cause issues, if
two virtual environments contain libraries/programs of the same name. To work
with different virtual environments with eric I would recommend the following.
1. Install eric in its own virtual environment. That is the one eric will show
as <default> if it is not renamed in the built-in Virtual Environment Manager.
2. If needed create a virtual environment for a project. This can be done from
within eric with the Virtualenv Configurator. This will add the created
environment to the Virtualenv Manager.
3. If 2. was done outside eric (e.g. with pyenv) add the project specific
environment to the Virtualenv Manager (through the respective dialog).
4. All environments of the Virtualenv Manage can be selected in the run dialog
or configured on a per project basis in the Project->Debugger->Debugger
Properties... dialog.
I hope this explanation helps a little bit.
Detlev
Am Sonntag, 17. Mai 2020, 12:32:12 CEST schrieb some.user at posteo.net:
> I have installed Eric in a virtual Env with pyenv and I need to have
> all my projects in own virtualenvs (to move them to other
> computers).
> Using Ubuntu18.04, my Eric20.5 does not see my installed packages.
> I see in the PyPI window a different list than on the command line.
> Programs using the standard library work fine in Eric. Programs that
> fail in Eric work fine on the command line. I ran out of ideas.
>
> Here is what I did:
> sudo apt purge eric # make sure the old stuff is
> fully gone
> pyenv install 3.6.9
> pyenv virtualenv 3.6.9 eric6
> pyenv activate eric6
> pip install eric-ide # installs fine
> eric6
>
> Now for my simple projects I keep a common virtual env "default"
> pyenv virtualenv 3.6.9 default
> pyenv activate default # works fine
> pip install wxPython
>
> Then I set "default" at Settings/Debugger/Python3 and both Run
> dialogs. When I open Eric's PyPI window and select "default" I see
> this:
> pip 18.1
> setuptools
> On the CLI with pip list I get:
> pip 20.1
> setuptools
> wxPython
> numpy
> So somehow the "default" virtualevn Eric uses is something different
> that the "default" pyenv uses on the command line. I read that the
> pyenv approach with shims can cause difficulties, but I have seen
> answers in this archive that suggest others are using pyenv as
> well. So I am hoping I have overlooked something.
>
> Thanks
> Tiger
--
Detlev Offenbach
detlev at die-offenbachs.de
More information about the Eric
mailing list