Skip to content

Commit cdcb65e

Browse files
bschoneckenyon
andauthored
Add section in README that simulates python3 -m pip install pandas --user (#725)
* Add section in README that simulates python3 -m pip install pandas --user. * Update README.md Co-authored-by: Kenyon Ralph <kenyon@kenyonralph.com> * Update README.md Co-authored-by: Kenyon Ralph <kenyon@kenyonralph.com> * Update README.md Co-authored-by: Kenyon Ralph <kenyon@kenyonralph.com> * Update README.md Co-authored-by: Kenyon Ralph <kenyon@kenyonralph.com> * Update README.md Co-authored-by: Kenyon Ralph <kenyon@kenyonralph.com> --------- Co-authored-by: Kenyon Ralph <kenyon@kenyonralph.com>
1 parent ecb8d77 commit cdcb65e

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,35 @@ For class usage refer to the [Reference]("https://github.com/voxpupuli/puppet-py
1919
bundle exec rake strings:generate\[',,,,false,true']
2020
```
2121

22+
### Install Python package to a user's default install directory
23+
24+
The following code simulates
25+
26+
```shell
27+
python3 -m pip install pandas --user
28+
```
29+
where pip installs packages to a user's default install directory --
30+
typically `~/.local/` on Linux.
31+
32+
```puppet
33+
# Somewhat hackishly, install Python PIP module PANDAS for Oracle Cloud API queries.
34+
python::pyvenv { 'user_python_venv':
35+
ensure => present,
36+
version => 'system',
37+
systempkgs => true,
38+
venv_dir => '/home/example/.local',
39+
owner => 'example',
40+
group => 'example',
41+
mode => '0750',
42+
}
43+
44+
python::pip { 'pandas':
45+
virtualenv => '/home/example/.local',
46+
owner => 'example',
47+
group => 'example',
48+
}
49+
```
50+
2251
### hiera configuration
2352

2453
This module supports configuration through hiera. The following example

0 commit comments

Comments
 (0)