Browse Source

Minor fixes.

dev
Franco Masotti 3 years ago
parent
commit
648f557de8
Signed by: frnmst
GPG Key ID: 24116ED85666780A
  1. 4
      .gitlab-ci.yml
  2. 10
      _posts/2019-11-10-running-python-scripts-with-different-package-versions.md

4
.gitlab-ci.yml

@ -5,7 +5,7 @@ image: ruby:2.6
test:
stage: test
script:
- gem install jekyll
- gem install jekyll 'forwardable:1.2.0'
- jekyll build -d test --future
artifacts:
paths:
@ -16,7 +16,7 @@ test:
pages:
stage: deploy
script:
- gem install jekyll jekyll-sitemap forwardable --version 1.2.0
- gem install jekyll jekyll-sitemap 'forwardable:1.2.0'
- jekyll build -d public --future
artifacts:
paths:

10
_posts/2019-11-10-running-python-scripts-with-different-package-versions.md

@ -1,7 +1,7 @@
---
title: Running python scripts using different package versions
tags: [python, pacman, pip, venv, script, shell, bash, AUR]
updated: 2019-11-10 17:05
tags: [python, python3, pacman, pip, venv, script, shell, bash, AUR]
updated: 2019-12-10 19:53
description: A couple of ways to prevent file conflicts on python packages and run scripts without package version problems
---
@ -14,7 +14,7 @@ are easy to come out.
<!--more-->
This problem stands out especially when using Python packages
This problem stands out especially when using Python 3 packages
installed from AUR because of their lack of maintenance. In this case
I was tempted to run ``pip3 install ${PACKAGE}``...
@ -51,7 +51,7 @@ installing a package using the root user (`# pip3 install "${PACKAGE_NAME}"`)
Install virtualenv and then create a new virtual environment:
```shell
python3 -m venv .local/venv/"${ENVIRONMENT_NAME}"
python3 -m venv ~/.local/venv/"${ENVIRONMENT_NAME}"
. ~/.local/venv/"${ENVIRONMENT_NAME}"/bin/activate
pip3 install ${YOUR_PACKAGES}
deactivate
@ -65,7 +65,7 @@ you must call the virtual interpreter directly:
Finally, add the path of the virtual environment executables to
the shell's path:
export PATH=$PATH:~/.local/venv/"${ENVIRONMENT_NAME}"/bin
export PATH=$PATH:$HOME/.local/venv/"${ENVIRONMENT_NAME}"/bin
Reload your shell to be able to call a virtual environment executable directly.

Loading…
Cancel
Save