Я скомпилировал Python 3.8.1 в домашнем каталоге пользователя с
configure --prefix=/home/a_user/python3.8 --enable-shared
- Когда я попытался использовать venv, я получаю:
python3 -m venv test_env
Error: Command '['/home/a_user/test_env/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
- test_env создан, но неполный:
test_env/
├── bin
│ ├── python -> python3
│ └── python3 -> /home/a_user/python3.8/bin/python3
├── include
├── lib
│ └── python3.8
│ └── site-packages
├── lib64 -> lib
└── pyvenv.cfg
6 directories, 3 files
- гарантия существует:
python3 -m ensurepip
Looking in links: /tmp/tmpeqrn78f5
Requirement already satisfied: setuptools in ./python3.8/lib/python3.8/site-packages (41.2.0)
Requirement already satisfied: pip in ./python3.8/lib/python3.8/site-packages (19.2.3)
Так что я не знаю, чего не хватает.
test_env/bin/python3 -Im ensurepip --upgrade --default-pip
— покажет ли она какие-либо результаты? - person Ry-♦   schedule 02.01.2020test_env/bin/python3 -m ensurepip --upgrade --default-pip
, все сработаетLooking in links: /tmp/tmp73vwpom8 Requirement already up-to-date: setuptools in ./test_env/lib/python3.8/site-packages (41.2.0) Requirement already up-to-date: pip in ./test_env/lib/python3.8/site-packages (19.2.3)
- person Richard   schedule 02.01.2020test_env/bin/python3 Python 3.8.1 (default, Jan 2 2020, 02:56:40) [GCC 7.4.1 20190905 [gcc-7-branch revision 275407]] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import math >>> math.factorial(4) 24
- person Richard   schedule 02.01.2020-Im
. По справке-I : isolate Python from the user's environment (implies -E and -s)
. А так как мой Python 3.8 скомпилирован в кастомную директорию, без окружения пользователя, конечно, не найдет. - person Richard   schedule 02.01.2020