Skip to content

Commit afacd15

Browse files
committed
Add section in README that simulates python3 -m pip install pandas --user.
1 parent ecb8d77 commit afacd15

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,33 @@ 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+
```shell
26+
python3 -m pip install pandas --user`
27+
```
28+
where pip installs packages to a user's default install directory --
29+
typically ~/.local/ on Linux.
30+
31+
```# Somewhat hackisly, install Python PIP module PANDAS for Oracle Cloud API queries.
32+
python::pyvenv { 'user_python_venv' :
33+
ensure => present,
34+
version => 'system',
35+
systempkgs => true,
36+
venv_dir => '/home/example/.local',
37+
owner => 'example',
38+
group => 'example',
39+
mode => '0750',
40+
}
41+
42+
python::pip { 'pandas':
43+
virtualenv => '/home/example/.local',
44+
owner => 'example',
45+
group => 'example',
46+
}
47+
```
48+
2249
### hiera configuration
2350
2451
This module supports configuration through hiera. The following example

0 commit comments

Comments
 (0)