V4.2 Linux install.sh bug

leenowell
Posts: 92
Joined: Tue Jan 15, 2019 1:50 pm

V4.2 Linux install.sh bug

Postby leenowell » Sat Jan 23, 2021 4:56 pm

Hi all,

I am trying to install v4.2 release on Ubuntu 20.04 and install.sh fails with

Code: Select all

Installing Python environment and packages
ERROR: This script was called from a virtual environment, can not create a virtual environment again
I have seen a bug report for Windows but can find nothing for Linux.

Thanks

Lee.

leenowell
Posts: 92
Joined: Tue Jan 15, 2019 1:50 pm

Re: V4.2 Linux install.sh bug

Postby leenowell » Sat Jan 23, 2021 6:47 pm

Hi
I can't find any mention of this issue online but different python orientated issues ask for some further info so have included below in case it helps

Code: Select all

~/esp/esp-idf$ git describe 
v4.2-238-g8cd16b60f

~/esp/esp-idf$ python --version
Python 3.8.5

~/tmp$ python3 -m virtualenv myenv
created virtual environment CPython3.8.5.final.0-64 in 2349ms
  creator CPython3Posix(dest=/home/lee/tmp/myenv, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/lee/.local/share/virtualenv)
    added seed packages: pip==20.3.3, setuptools==51.0.0, wheel==0.36.2
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Thanks

Lee.

chegewara
Posts: 2362
Joined: Wed Jun 14, 2017 9:00 pm

Re: V4.2 Linux install.sh bug

Postby chegewara » Sat Jan 23, 2021 7:31 pm

Im not 100% certain, but i think esp-idf itself is running in virtual env.
The message you get here also would suggest that:

Code: Select all

ERROR: This script was called from a virtual environment, can not create a virtual environment again
All you have to do is to source esp-idf in terminal that will be used to build:

Code: Select all

. ~/esp/esp-idf/export.sh  // in my case

leenowell
Posts: 92
Joined: Tue Jan 15, 2019 1:50 pm

Re: V4.2 Linux install.sh bug

Postby leenowell » Sat Jan 23, 2021 9:07 pm

Thanks very much for your reply. I ended up deleting my idf directory and doing a fresh clone and still no joy. I then rebooted and tried install.sh again and it worked fine. I suspect something must have been running which prevented the virtual environment being created? Seems very odd to be honest.

thanks

Lee.

JoeSensoric
Posts: 29
Joined: Fri Mar 03, 2017 10:31 am

Re: V4.2 Linux install.sh bug

Postby JoeSensoric » Sun Feb 21, 2021 10:07 am

I had the same problem today and after rebooting the (virtual) Linux machine the problem disappeared. I did a Linux / apt update before and I think this changed something in the environment and produced an "inconsistent state", so a reboot solved it.

jwwest
Posts: 6
Joined: Sat Dec 28, 2019 8:31 pm

Re: V4.2 Linux install.sh bug

Postby jwwest » Thu Mar 24, 2022 9:59 pm

Just wanted to provide my experience with this exact issue... if you are in a shell where you previously ran the install.sh script, perhaps for a previous version of the IDF, I think this can cause the "ERROR: This script was called from a virtual environment, can not create a virtual environment again". Opening a new terminal and then running the install.sh script should work fine.

-jw

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], Eshwar487 and 83 guests