Mercurial > hg > Blog
comparison content/Python/installing-packages-in-userspace-on-osx.md @ 98:1d9382b0329b
Specify the syntax on markdown blocks to avoid broken output that has class=err
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Thu, 19 Dec 2019 10:04:33 +0100 |
parents | cdb041787591 |
children |
comparison
equal
deleted
inserted
replaced
97:e99db3bc53c1 | 98:1d9382b0329b |
---|---|
6 | 6 |
7 Now I don't have the developer tools installed and I didn't intend to do so - wastes gigabytes of disk space that will hardly ever be used after all. So I tried to get away with the Python that's installed out of the box. | 7 Now I don't have the developer tools installed and I didn't intend to do so - wastes gigabytes of disk space that will hardly ever be used after all. So I tried to get away with the Python that's installed out of the box. |
8 | 8 |
9 Before I can use `pip` it has to be installed. I want to install everything in userspace so first a proper PYTHONPATH has to be set up: | 9 Before I can use `pip` it has to be installed. I want to install everything in userspace so first a proper PYTHONPATH has to be set up: |
10 | 10 |
11 :::shell | |
11 export PYTHONPATH=/Users/dirk/Python/site-packages | 12 export PYTHONPATH=/Users/dirk/Python/site-packages |
12 | 13 |
13 Then I can go ahead and use `easy_install` to install `pip`: | 14 Then I can go ahead and use `easy_install` to install `pip`: |
14 | 15 |
16 :::shell | |
15 easy_install --install-dir /Users/dirk/Python/site-packages pip | 17 easy_install --install-dir /Users/dirk/Python/site-packages pip |
16 | 18 |
17 Make sure to add `/Users/dirk/Python` to your PATH so that you can call pip without specifying the full path. | 19 Make sure to add `/Users/dirk/Python` to your PATH so that you can call pip without specifying the full path. |
18 | 20 |
19 Now I can start installing packages: | 21 Now I can start installing packages: |
20 | 22 |
23 :::shell | |
21 pip install --target /Users/dirk/Python/site-packages <package> | 24 pip install --target /Users/dirk/Python/site-packages <package> |
22 | 25 |
23 This approach has its limitations, though. Since the developer tools aren't installed packages that require compliation of C code won't work. | 26 This approach has its limitations, though. Since the developer tools aren't installed packages that require compliation of C code won't work. |