Pip tips and tricks: Difference between revisions

From HPCWIKI
Jump to navigation Jump to search
(Add categories: Linux, Reference)
(Fix: remove --- horizontal lines (7 removed))
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Status
|status=Draft
|owner=Knowledge Agent
|last_update=2026-07-16
|review=Pending
}}
{{TOC}}
== Overview ==
Pip tips and tricks에 대한 기술 문서입니다.
=== Summary ===
* 무엇인가? - Pip tips and tricks
* 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
* 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시
== Purpose ==
이 문서가 존재하는 이유
* Goal: Pip tips and tricks에 대한 기술 정보 제공
* Scope: Pip tips and tricks의 개념, 사용법, 설정
* Non-goals: 다른 주제로의 확장
== Key Concepts ==
{| class="wikitable"
! Concept
! Description
! Related
|-
| Pip tips and tricks
| HPC/서버 환경에서 중요한 기술 개념
| [[Linux]], [[Server]]
|}
== Detailed Explanation ==


== Install latest pip<ref>https://robots.uc3m.es/installation-guides/install-pip.html</ref> ==
Install latest pip at the first time on the system
Install latest pip at the first time on the system
  <code>wget <nowiki>https://bootstrap.pypa.io/get-pip.py</nowiki> | sudo python</code>
  <code>wget <nowiki>https://bootstrap.pypa.io/get-pip.py</nowiki> | sudo python</code>
== No module named 'distutils.cmd' ==
Need to install Python distutils and apt
Need to install Python distutils and apt
  sudo apt-get install python3-distutils python3-apt
  sudo apt-get install python3-distutils python3-apt
== ERROR: Could not install packages due to an OSError: Errno 1 Operation not permitted ==
'''The "OSError: [Error 1] Operation not permitted" error is often caused by having incompatible versions of packages on system.''' <syntaxhighlight lang="bash">
'''The "OSError: [Error 1] Operation not permitted" error is often caused by having incompatible versions of packages on system.''' <syntaxhighlight lang="bash">
# reinstall the problem package with update version
# reinstall the problem package with update version
pip install --ignore-installed --upgrade <packages>
pip install --ignore-installed --upgrade <packages>
</syntaxhighlight>
</syntaxhighlight>
== module 'lib' has no attribute 'X509_V_FLAG_NOTIFY_POLICY ==
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Remove installed OpenSSL lib package  
# Remove installed OpenSSL lib package  
$sudo rm -rf /usr/lib/python3/dist-packages/OpenSSL
$sudo rm -rf /usr/lib/python3/dist-packages/OpenSSL
# Reinstall updated pyopenssl
# Reinstall updated pyopenssl
$sudo -H pip3 install -U pyopenssl
$sudo -H pip3 install -U pyopenssl
</syntaxhighlight>
</syntaxhighlight>
== WARNING: Running pip as the 'root' user ==
This was introduced in pip <code>21.1</code> as a "bug fix" as of pip 22.1<ref>https://stackoverflow.com/questions/68673221/warning-running-pip-as-the-root-user</ref> <syntaxhighlight lang="bash">
This was introduced in pip <code>21.1</code> as a "bug fix" as of pip 22.1<ref>https://stackoverflow.com/questions/68673221/warning-running-pip-as-the-root-user</ref> <syntaxhighlight lang="bash">
#you can now opt out of the warning using a parameter:
#you can now opt out of the warning using a parameter:
$sudo pip install --root-user-action=ignore <packages>
$sudo pip install --root-user-action=ignore <packages>
# You can ignore this in your container by using the environment:
# You can ignore this in your container by using the environment:
ENV PIP_ROOT_USER_ACTION=ignore
ENV PIP_ROOT_USER_ACTION=ignore
</syntaxhighlight>
== Best Practices ==
* 최신 버전 사용 권장
* 공식 문서 참고
* 테스트 환경에서 먼저 검증


</syntaxhighlight>


== References ==
== References ==
<references />
 
[[Category:Linux]]
* [https://wiki.hpcmate.com Pip tips and tricks]
 
 
== Related Pages ==
 
* [[Linux]]
* [[Server]]
* [[Hardware]]
* [[Network]]
 
 
[[Category:Server]]
== Knowledge Graph ==
 
Related
 
→ [[Linux]]
→ [[Server]]
→ [[Hardware]]
→ [[Network]]


[[Category:Reference]]
[[Category:Reference]]

Latest revision as of 11:30, 17 July 2026

Template:Status

Template:TOC

Overview

Pip tips and tricks에 대한 기술 문서입니다.

Summary

  • 무엇인가? - Pip tips and tricks
  • 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
  • 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시


Purpose

이 문서가 존재하는 이유

  • Goal: Pip tips and tricks에 대한 기술 정보 제공
  • Scope: Pip tips and tricks의 개념, 사용법, 설정
  • Non-goals: 다른 주제로의 확장


Key Concepts

Concept Description Related
Pip tips and tricks HPC/서버 환경에서 중요한 기술 개념 Linux, Server


Detailed Explanation

Install latest pip at the first time on the system

wget https://bootstrap.pypa.io/get-pip.py | sudo python

Need to install Python distutils and apt

sudo apt-get install python3-distutils python3-apt

The "OSError: [Error 1] Operation not permitted" error is often caused by having incompatible versions of packages on system.

# reinstall the problem package with update version
pip install --ignore-installed --upgrade <packages>
# Remove installed OpenSSL lib package 
$sudo rm -rf /usr/lib/python3/dist-packages/OpenSSL
# Reinstall updated pyopenssl
$sudo -H pip3 install -U pyopenssl

This was introduced in pip 21.1 as a "bug fix" as of pip 22.1[1]

#you can now opt out of the warning using a parameter:
$sudo pip install --root-user-action=ignore <packages>
# You can ignore this in your container by using the environment:
ENV PIP_ROOT_USER_ACTION=ignore


Best Practices

  • 최신 버전 사용 권장
  • 공식 문서 참고
  • 테스트 환경에서 먼저 검증


References


Related Pages

Knowledge Graph

Related

LinuxServerHardwareNetwork