Skip to content

Conversation

@d1m1trus
Copy link
Contributor

@d1m1trus d1m1trus commented Aug 2, 2023

Ubuntu 23.04
Fixed Installation aborted due to not being able to install an older version of python3.10-venv

Fix Installation aborted due to not being able to install an older version of python3.10-venv
@d1m1trus d1m1trus requested a review from a team as a code owner August 2, 2023 20:27
@paninaro paninaro requested a review from altendky August 2, 2023 20:44
@wallentx
Copy link
Contributor

wallentx commented Aug 2, 2023

There was some discussion about this not too long ago that I wanted to bring up here. For best compatibility, I think we should just use sudo apt-get install -y python3-venv openssl, right?
I just ran:

docker pull ubuntu
docker run -it ubuntu
apt-cache search python3 venv

Which returned:

python3-venv - venv module for python3 (default python3 version)
python3.10-venv - Interactive high-level object-oriented language (pyvenv binary, version 3.10)
python3.11-venv - Interactive high-level object-oriented language (pyvenv binary, version 3.11)

That way we don't have to worry about bumping this for a while.

@d1m1trus d1m1trus changed the title Fix python3.11-venv into install.sh Fixed python3.11-venv into install.sh Aug 2, 2023
@wallentx wallentx added the Changed Required label for PR that categorizes merge commit message as "Changed" for changelog label Aug 2, 2023
@d1m1trus
Copy link
Contributor Author

d1m1trus commented Aug 2, 2023

apt-cache search python3 venv

Ubuntu 23.04:

python3-full - Default Python Interpreter with complete class library
python3-pylint-venv - Pylint hook to use same pylint with different virtual envs
python3-venv - venv module for python3 (default python3 version)
python3-virtualenv - Python virtual environment creator
python3.11-full - Python Interpreter with complete class library (version 3.11)
python3.11-venv - Interactive high-level object-oriented language (pyvenv binary, version 3.11)
Installing on Ubuntu 22.* or newer.
Hit:1 https://dl.winehq.org/wine-builds/ubuntu jammy InRelease
Hit:2 https://download.vscodium.com/debs vscodium InRelease
Hit:3 http://ua.archive.ubuntu.com/ubuntu lunar InRelease
Hit:4 http://ua.archive.ubuntu.com/ubuntu lunar-updates InRelease
Hit:5 http://ua.archive.ubuntu.com/ubuntu lunar-backports InRelease
Hit:6 http://ua.archive.ubuntu.com/ubuntu lunar-security InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python3.10-venv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python3.10-venv' has no installation candidate
This requires the chia python virtual environment.
Execute '. ./activate' before running.

Fixed Installation aborted due to not being able to install an older version of python3.10-venv
@wallentx
Copy link
Contributor

wallentx commented Aug 2, 2023

By the way, I'm not picking on you about this 🙂
There was a prior PR that also attempted to make this change, but there was some disagreement about some aspect of it. I'm glad you brought this back up, as it needs attention.

Installing on Ubuntu 22.* or newer.
Hit:1 https://dl.winehq.org/wine-builds/ubuntu jammy InRelease
Hit:2 https://download.vscodium.com/debs vscodium InRelease
Hit:3 http://ua.archive.ubuntu.com/ubuntu lunar InRelease
Hit:4 http://ua.archive.ubuntu.com/ubuntu lunar-updates InRelease
Hit:5 http://ua.archive.ubuntu.com/ubuntu lunar-backports InRelease
Hit:6 http://ua.archive.ubuntu.com/ubuntu lunar-security InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python3.10-venv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python3.10-venv' has no installation candidate
This requires the chia python virtual environment.
Execute '. ./activate' before running.

Were you seeing the above when specifying just python3-venv in 23.04?

Just to be clear since it might be easy to misread-
install.sh currently has: python3.10-venv
You propose that we use: python3.11-venv
I'm wonder why we don't: python3-venv

I tried it just now on ubuntu:23.04 and it had no problem.

Installing on Ubuntu 22.* or newer.
Hit:1 http://archive.ubuntu.com/ubuntu lunar InRelease
Hit:2 http://security.ubuntu.com/ubuntu lunar-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu lunar-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu lunar-backports InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
openssl is already the newest version (3.0.8-1ubuntu1.2).
openssl set to manually installed.
The following NEW packages will be installed:
  python3-venv
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1038 B of archives.
After this operation, 6144 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu lunar/universe amd64 python3-venv amd64 3.11.2-1 [1038 B]
Fetched 1038 B in 0s (8811 B/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package python3-venv.
(Reading database ... 16580 files and directories currently installed.)
Preparing to unpack .../python3-venv_3.11.2-1_amd64.deb ...
Unpacking python3-venv (3.11.2-1) ...
Setting up python3-venv (3.11.2-1) ...
Searching available python executables...
Python version is 3.11
SQLite version for Python is 3.40.1
OpenSSL version for Python is OpenSSL 3.0.8 7 Feb 2023
Requirement already satisfied: pip in ./venv/lib/python3.11/site-packages (23.0.1)
Collecting pip
  Downloading pip-23.2.1-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 20.4 MB/s eta 0:00:00
...

@d1m1trus
Copy link
Contributor Author

d1m1trus commented Aug 2, 2023

I'm wonder why we don't: python3-venv

Yes indeed, why not use python3-venv, it solves the problem :)

@hoffmang9
Copy link
Member

This is a carryover that has been carried farther than it should have. Back in the 18.04 days, you really needed to be specific due to 18.04 defaulting to python 3.6:

# distutils must be installed as well to avoid a complaint about ensurepip while
    # creating the venv.  This may be related to a mis-check while using or
    # misconfiguration of the secondary Python version 3.7.  The primary is Python 3.6.
    sudo apt-get install -y python3.7-venv python3.7-distutils openssl

Since then, we probably have not needed to specify after 20.04.

Fixed Installation aborted due to not being able to install an older version of python3.10-venv
@d1m1trus d1m1trus changed the title Fixed python3.11-venv into install.sh Fixed python3-venv into install.sh Aug 2, 2023
Copy link
Member

@hoffmang9 hoffmang9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@arvidn arvidn closed this Aug 3, 2023
@arvidn arvidn reopened this Aug 3, 2023
@wallentx wallentx merged commit 6dd3a4d into Chia-Network:main Aug 3, 2023
geoffwalmsley pushed a commit that referenced this pull request Aug 4, 2023
* Fix python3.11-venv into install.sh

Fix Installation aborted due to not being able to install an older version of python3.10-venv

* Fixed python3.11-venv into install.sh rev2

Fixed Installation aborted due to not being able to install an older version of python3.10-venv

* Fixed python3.11-venv into install.sh rev3

Fixed Installation aborted due to not being able to install an older version of python3.10-venv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changed Required label for PR that categorizes merge commit message as "Changed" for changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants