Skip to content

Commit 000df13

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

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,34 @@ 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+
```
32+
# Somewhat hackisly, install Python PIP module PANDAS for Oracle Cloud API queries.
33+
python::pyvenv { 'user_python_venv' :
34+
ensure => present,
35+
version => 'system',
36+
systempkgs => true,
37+
venv_dir => '/home/example/.local',
38+
owner => 'example',
39+
group => 'example',
40+
mode => '0750',
41+
}
42+
43+
python::pip { 'pandas':
44+
virtualenv => '/home/example/.local',
45+
owner => 'example',
46+
group => 'example',
47+
}
48+
```
49+
2250
### hiera configuration
2351
2452
This module supports configuration through hiera. The following example

0 commit comments

Comments
 (0)