« Annexes:Python » : différence entre les versions
Aller à la navigation
Aller à la recherche
Aucun résumé des modifications |
Aucun résumé des modifications |
||
| Ligne 1 : | Ligne 1 : | ||
Téléchargez les sources et mettez-les dans /tmp : | Téléchargez les sources et mettez-les dans /tmp : | ||
<pre> | <pre> | ||
# Install Python-3. | # Install Python-3.12.8 | ||
# https://www.python.org/ftp/python/3. | # https://www.python.org/ftp/python/3.12.8/Python-3.12.8.tgz | ||
</pre> | </pre> | ||
| Ligne 9 : | Ligne 9 : | ||
mkdir /home/dbsqware/dbSQWare/SQWarePredict/python-src | mkdir /home/dbsqware/dbSQWare/SQWarePredict/python-src | ||
mkdir -p /home/dbsqware/dbSQWare/SQWarePredict/python/3. | mkdir -p /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8 | ||
cd /home/dbsqware/dbSQWare/SQWarePredict/python-src | cd /home/dbsqware/dbSQWare/SQWarePredict/python-src | ||
tar -xzvf /tmp/Python-3. | tar -xzvf /tmp/Python-3.12.8.tgz | ||
cd Python-3. | cd Python-3.12.8 | ||
# configure, dest => /home/dbsqware/dbSQWare/SQWarePredict/python/3. | # configure, dest => /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8 | ||
./configure --prefix=/home/dbsqware/dbSQWare/SQWarePredict/python/3. | ./configure --prefix=/home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8 --enable-optimizations | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Ligne 37 : | Ligne 37 : | ||
# enabled. | # enabled. | ||
make profile-gen-stamp | make profile-gen-stamp | ||
make[1]: Entering directory '/home/dbsqware/dbSQWare/SQWarePredict/python-src/Python-3. | make[1]: Entering directory '/home/dbsqware/dbSQWare/SQWarePredict/python-src/Python-3.12.8' | ||
make clean | make clean | ||
make[2]: Entering directory '/home/dbsqware/dbSQWare/SQWarePredict/python-src/Python-3. | make[2]: Entering directory '/home/dbsqware/dbSQWare/SQWarePredict/python-src/Python-3.12.8' | ||
find . -depth -name '__pycache__' -exec rm -rf {} ';' | find . -depth -name '__pycache__' -exec rm -rf {} ';' | ||
... | ... | ||
| Ligne 50 : | Ligne 50 : | ||
<pre> | <pre> | ||
Creating directory /home/dbsqware/dbSQWare/SQWarePredict/python/3. | Creating directory /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/bin | ||
Creating directory /home/dbsqware/dbSQWare/SQWarePredict/python/3. | Creating directory /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/lib | ||
if test "no-framework" = "no-framework" ; then \ | if test "no-framework" = "no-framework" ; then \ | ||
/usr/bin/install -c python /home/dbsqware/dbSQWare/SQWarePredict/python/3. | /usr/bin/install -c python /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/bin/python3.9; \ | ||
... | ... | ||
... | ... | ||
Installing collected packages: setuptools, pip | Installing collected packages: setuptools, pip | ||
WARNING: The scripts pip3 and pip3.9 are installed in '/home/dbsqware/dbSQWare/SQWarePredict/python/3. | WARNING: The scripts pip3 and pip3.9 are installed in '/home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/bin' which is not on PATH. | ||
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. | Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. | ||
Successfully installed pip-23.0.1 setuptools-58.1.0 | Successfully installed pip-23.0.1 setuptools-58.1.0 | ||
| Ligne 64 : | Ligne 64 : | ||
<syntaxhighlight lang="sh" line> | <syntaxhighlight lang="sh" line> | ||
# creation des liens python et pip | # creation des liens python et pip | ||
cd /home/dbsqware/dbSQWare/SQWarePredict/python/3. | cd /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/bin | ||
ln -s python3 python | ln -s python3 python | ||
ln -s pip3 pip | ln -s pip3 pip | ||
| Ligne 71 : | Ligne 71 : | ||
Dans le ~dbsqware/.bash_profile | Dans le ~dbsqware/.bash_profile | ||
<syntaxhighlight lang="sh" line> | <syntaxhighlight lang="sh" line> | ||
# env Python 3. | # env Python 3.12.8 (pour SQWarePredict) | ||
export PATH=/home/dbsqware/dbSQWare/SQWarePredict/python/3. | export PATH=/home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/bin:$PATH | ||
export LD_LIBRARY_PATH=/home/dbsqware/dbSQWare/SQWarePredict/python/3. | export LD_LIBRARY_PATH=/home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/lib:$LD_LIBRARY_PATH | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Ligne 80 : | Ligne 80 : | ||
dbsqware@vmsqwarebox:/home/dbsqware $ type python | dbsqware@vmsqwarebox:/home/dbsqware $ type python | ||
python is /home/dbsqware/dbSQWare/SQWarePredict/python/3. | python is /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/bin/python | ||
dbsqware@vmsqwarebox:/home/dbsqware $ type pip | dbsqware@vmsqwarebox:/home/dbsqware $ type pip | ||
pip is /home/dbsqware/dbSQWare/SQWarePredict/python/3. | pip is /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/bin/pip | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Ligne 91 : | Ligne 91 : | ||
dbsqware@vmsqwarebox:/home/dbsqware $ python --version | dbsqware@vmsqwarebox:/home/dbsqware $ python --version | ||
Python 3. | Python 3.12.8 | ||
dbsqware@vmsqwarebox:/home/dbsqware $ pip --version | dbsqware@vmsqwarebox:/home/dbsqware $ pip --version | ||
pip 23.0.1 from /home/dbsqware/dbSQWare/SQWarePredict/python/3. | pip 23.0.1 from /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/lib/python3.9/site-packages/pip (python 3.9) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Version du 8 janvier 2025 à 12:15
Téléchargez les sources et mettez-les dans /tmp :
# Install Python-3.12.8 # https://www.python.org/ftp/python/3.12.8/Python-3.12.8.tgz
# From : dbsqware@vmsqwarebox
mkdir /home/dbsqware/dbSQWare/SQWarePredict/python-src
mkdir -p /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8
cd /home/dbsqware/dbSQWare/SQWarePredict/python-src
tar -xzvf /tmp/Python-3.12.8.tgz
cd Python-3.12.8
# configure, dest => /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8
./configure --prefix=/home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8 --enable-optimizations
checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking for python3.9... python3.9 checking for --enable-universalsdk... no checking for --with-universal-archs... no ...
# compil
make
Running code to generate profile data (this can take a while):
# First, we need to create a clean build with profile generation
# enabled.
make profile-gen-stamp
make[1]: Entering directory '/home/dbsqware/dbSQWare/SQWarePredict/python-src/Python-3.12.8'
make clean
make[2]: Entering directory '/home/dbsqware/dbSQWare/SQWarePredict/python-src/Python-3.12.8'
find . -depth -name '__pycache__' -exec rm -rf {} ';'
...
# install
make install
Creating directory /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/bin
Creating directory /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/lib
if test "no-framework" = "no-framework" ; then \
/usr/bin/install -c python /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/bin/python3.9; \
...
...
Installing collected packages: setuptools, pip
WARNING: The scripts pip3 and pip3.9 are installed in '/home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-23.0.1 setuptools-58.1.0
# creation des liens python et pip
cd /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/bin
ln -s python3 python
ln -s pip3 pip
Dans le ~dbsqware/.bash_profile
# env Python 3.12.8 (pour SQWarePredict)
export PATH=/home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/bin:$PATH
export LD_LIBRARY_PATH=/home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/lib:$LD_LIBRARY_PATH
# vérification du PATH
dbsqware@vmsqwarebox:/home/dbsqware $ type python
python is /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/bin/python
dbsqware@vmsqwarebox:/home/dbsqware $ type pip
pip is /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/bin/pip
# vérification des versions
dbsqware@vmsqwarebox:/home/dbsqware $ python --version
Python 3.12.8
dbsqware@vmsqwarebox:/home/dbsqware $ pip --version
pip 23.0.1 from /home/dbsqware/dbSQWare/SQWarePredict/python/3.12.8/lib/python3.9/site-packages/pip (python 3.9)