python pip installieren in bestimmten Pfad

mercredi 10 août 2016

Hi,

ich bin wenig begeistert von pip, muss es jedoch nutzen.

Hier wuerde ich gerne die per pip gebauten Pakete in einen speziellen Pfad installieren und dann voll qualifizert aufrufen.

Das hat soweit funktioniert mit

Code:

pip3 install --target /opt/pip_python3/ PyYAML jinja2 paramiko ansible

# ls -lah
total 616K
drwxr-xr-x 29 root root 4.0K Aug 10 08:59 .
drwxr-xr-x  7 root root  79 Aug  9 14:21 ..
drwxr-xr-x 11 root root 4.0K Aug 10 08:59 Crypto
drwxr-xr-x  2 root root  131 Aug 10 08:58 Jinja2-2.8.dist-info
drwxr-xr-x  2 root root  105 Aug 10 08:58 MarkupSafe-0.23.egg-info
drwxr-xr-x  2 root root  86 Aug 10 08:58 PyYAML-3.11.egg-info
drwxr-xr-x  2 root root  65 Aug 10 08:59 __pycache__
-rwxr-xr-x  1 root root 534K Aug 10 08:59 _cffi_backend.cpython-34m.so
drwxr-xr-x 19 root root 4.0K Aug 10 08:58 ansible
drwxr-xr-x  2 root root  105 Aug 10 08:58 ansible-2.1.1.0.egg-info
drwxr-xr-x  3 root root 4.0K Aug 10 08:59 cffi
drwxr-xr-x  2 root root  147 Aug 10 08:59 cffi-1.7.0.egg-info
drwxr-xr-x  5 root root  136 Aug 10 08:59 cryptography
drwxr-xr-x  2 root root  147 Aug 10 08:59 cryptography-1.4.egg-info
-rw-r--r--  1 root root  126 Aug 10 08:58 easy_install.py
drwxr-xr-x  3 root root  143 Aug 10 08:59 idna
drwxr-xr-x  2 root root  108 Aug 10 08:59 idna-2.1.dist-info
drwxr-xr-x  3 root root 4.0K Aug 10 08:58 jinja2
drwxr-xr-x  3 root root 4.0K Aug 10 08:58 markupsafe
drwxr-xr-x  3 root root 4.0K Aug 10 08:58 paramiko
drwxr-xr-x  2 root root  123 Aug 10 08:58 paramiko-2.0.2.dist-info
drwxr-xr-x  5 root root  69 Aug 10 08:59 pkg_resources
drwxr-xr-x  6 root root  108 Aug 10 08:58 pyasn1
drwxr-xr-x  2 root root  123 Aug 10 08:58 pyasn1-0.1.9.dist-info
drwxr-xr-x  4 root root 4.0K Aug 10 08:59 pycparser
drwxr-xr-x  2 root root  86 Aug 10 08:59 pycparser-2.14.egg-info
drwxr-xr-x  2 root root  86 Aug 10 08:59 pycrypto-2.6.1.egg-info
drwxr-xr-x  5 root root 4.0K Aug 10 08:59 setuptools
drwxr-xr-x  2 root root 4.0K Aug 10 08:59 setuptools-25.1.6.dist-info
drwxr-xr-x  2 root root  108 Aug 10 08:59 six-1.10.0.dist-info
-rw-r--r--  1 root root  30K Aug 10 08:58 six.py
drwxr-xr-x  3 root root 4.0K Aug 10 08:58 yaml

Nun vermisse ich jedoch das binary ansible und die neue Version von ansible zu starten.

Meine Fragen:
- Wo sind die bin files
- Mache ich etwas grundlegend Falsch?


0 commentaires:

Enregistrer un commentaire

 

Lorem

Ipsum

Dolor