python version and venv issues with install.sh on Ubuntu 20.04 #8316
Replies: 3 comments
-
just commenting to keep track |
Beta Was this translation helpful? Give feedback.
-
Looking at the info you provided, your problem might be due to the python3.9 installation. In Ubuntu 20.04, the default python version is 3.8. So other packages that depend on python should be expecting python3.8. However, in your system, this default was changed to Python 3.9 as the attempt to create a new venv ended up with a Python 3.9 environment as observed in the outputs. As your original error mentions, you need to install the python3-venv package using apt. But since python3.9 was installed as well, I believe apt isn't able to figure out anymore what to install. So explicitly mentioning the full version may solve your problem.
After that is done, you need to create a venv by also explicitly passing the full python version
|
Beta Was this translation helpful? Give feedback.
-
@jamesjjcondon , since this ticket was opened a number of years ago without further comments it seems this issue has been resolved. The best place to reach our support team is on Discord (https://discord.gg/chia) or by reopening this ticket. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to setup and suspect there are issues with my python versions.
install.sh throws:
Python version is 3.7 Error: Command '['/home/drjc/mydev/chia-blockchain/venv/bin/python3.7', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
this is what I tried:
`drjc@home:/mydev/chia-blockchain$ sh install.sh
apt-get is /usr/bin/apt-get
Installing on Ubuntu 20.04 LTS.
[sudo] password for drjc:
Hit:1 https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64 InRelease
Hit:2 http://au.archive.ubuntu.com/ubuntu focal InRelease
Get:3 https://nvidia.github.io/nvidia-container-runtime/stable/ubuntu18.04/amd64 InRelease [1,481 B]
Hit:4 https://nvidia.github.io/nvidia-docker/ubuntu18.04/amd64 InRelease
Hit:5 https://repo.skype.com/deb stable InRelease
Hit:6 https://dl.winehq.org/wine-builds/ubuntu disco InRelease
Hit:7 https://download.docker.com/linux/ubuntu focal InRelease
Hit:8 http://au.archive.ubuntu.com/ubuntu focal-updates InRelease
Get:9 http://au.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Hit:10 http://archive.lambdalabs.com/ubuntu focal InRelease
Ign:11 http://dl.google.com/linux/chrome-remote-desktop/deb stable InRelease
Hit:12 http://ppa.launchpad.net/alexlarsson/flatpak/ubuntu focal InRelease
Hit:13 https://packages.microsoft.com/repos/ms-teams stable InRelease
Get:14 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:15 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease
Hit:16 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:17 http://dl.google.com/linux/chrome-remote-desktop/deb stable Release
Fetched 216 kB in 3s (69.4 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-distutils is already the newest version (3.8.10-0ubuntu1
20.04).20.04).python3.8-venv is already the newest version (3.8.10-0ubuntu1
0 to upgrade, 0 to newly install, 0 to remove and 43 not to upgrade.
Python version is 3.7
Error: Command '['/home/drjc/mydev/chia-blockchain/venv/bin/python3.7', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
drjc@home:
/mydev/chia-blockchain$ which python/mydev/chia-blockchain$ /usr/bin/python/usr/bin/python
drjc@home:
Python 3.8.10 (default, Jun 2 2021, 10:49:15)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
KeyboardInterrupt
drjc@home:
/mydev/chia-blockchain$ python -m venv venv/mydev/chia-blockchain$ /home/drjc/mydev/chia-blockchain/venv/bin/pythonError: Command '['/home/drjc/mydev/chia-blockchain/venv/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
drjc@home:
Python 3.7.11 (default, Jul 3 2021, 17:58:19)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
drjc@home:~/mydev/chia-blockchain$ python3
Python 3.8.10 (default, Jun 2 2021, 10:49:15)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
KeyboardInterrupt
drjc@home:~/mydev/chia-blockchain$ python
Python 3.8.10 (default, Jun 2 2021, 10:49:15)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
KeyboardInterrupt
drjc@home:
/mydev/chia-blockchain$ python -m venv venv/mydev/chia-blockchain$ python3 -m venv venvError: Command '['/home/drjc/mydev/chia-blockchain/venv/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
drjc@home:
Error: Command '['/home/drjc/mydev/chia-blockchain/venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
drjc@home:~/mydev/chia-blockchain$ python3.8
Python 3.8.10 (default, Jun 2 2021, 10:49:15)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
drjc@home:
/mydev/chia-blockchain$ python3.8 -m venv venv/mydev/chia-blockchain$ . ./activatedrjc@home:
bash: ./activate: No such file or directory
`
I think the wrong version is being selected here or somewhere in find_python() because I can work-around by manually putting in python3.8 here
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions