developer tip

Python 3.6에 PIP를 설치하는 방법은 무엇입니까?

optionbox 2020. 9. 5. 09:46
반응형

Python 3.6에 PIP를 설치하는 방법은 무엇입니까?


Python 3.6 용 PIP를 설치하려고하는데 YouTube에서 자습서를 살펴 봤지만 모두 구식 인 것 같고 작동하지 않는 것 같습니다. 내 프로젝트를 계속할 수 있도록 모든 정보가 도움이 될 것입니다.


pip Python> 3.4와 함께 번들로 제공됩니다.

유닉스 계열 시스템에서는 다음을 사용합니다.

python3.6 -m pip install [Package_to_install]

Windows 시스템에서 다음을 사용하십시오.

py -m pip install [Package_to_install]

(Windows에서 python 설치 디렉토리에 쓸 수 있으려면 관리자로 명령 프롬프트를 실행해야 할 수 있습니다.)


Python 3.6 다운로드

pip가 기본적으로 설치되지 않을 수 있습니다. 한 가지 잠재적 인 수정 사항은 cmd를 열고 다음을 입력하는 것입니다.

python -m ensurepip --default-pip

그리고

python -m pip install matplotlib

실제로 내 스크립트 폴더 idk에 아무것도 없었지만 이러한 단계가 저에게 효과적이었습니다.


pip가 python 3.6 설치와 함께 제공되지 않으면 다음과 같이 작동 할 수 있습니다.

wget https://bootstrap.pypa.io/get-pip.py
sudo python3.6 get-pip.py

그런 다음 python -m install


pip는 Python 설치에 포함되어 있습니다. pip.exe를 호출 할 수 없으면 cmd에서 python -m pip [args]를 호출 해보십시오.


Python을 어떻게 설치했고 가상 환경을 사용하고 있습니까?
특별히 Python 3.6을 언급했지만 답변으로 표시하지 않았으므로 sudo add-apt-repository ppa : jonathonf / python-3.6을 사용하여 설치했을 수 있다고 추측합니다 . 이것은 Python을 설치하는 일반적인 방법이기 때문입니다. 3.6 네이티브 3.6 패키지가없는 Unix OS에서. 이 경우 pip를 설치하는 올바른 방법은 다음과 같습니다.

1 단계) Python 3.6으로 가상 환경 만들기 ...

python3.6 -m venv env --without-pip

2 단계) 가상 환경 활성화 ...

source env/bin/activate

3 단계) 환경에 pip 설치 ...

curl https://bootstrap.pypa.io/get-pip.py | python3

Centos 7에서이 명령을 사용했습니다.

yum install python36
yum install python36-devel
yum install python36-pip
yum install python36-setuptools
easy_install-3.6 pip

pip 버전을 확인하려면 :

pip3 -V
pip 18.0 from /usr/local/lib/python3.6/site-packages/pip-18.0-py3.6.egg/pip (python 3.6)

pip파이썬 설치와 함께 다운로드되지 않는 상황이 있습니다 . 전체 스크립트 폴더도 비어있을 수 있습니다.

수동으로도 할 수 있습니다.

명령 프롬프트로 이동하여 python -m ensurepip --default-pipEnter를 누르십시오.

경로 변수의 값이 업데이트되었는지 확인하십시오.

이것은 트릭을 할 것입니다


Python 3.6을 다운로드하고 설치하는 데 문제가 있습니다. 설치에서 pip를 선택 취소하면 문제가 방지됩니다. 따라서 모든 설치에 pip가 제공되는 것은 아닙니다.


이 순간 Windows에 python 3.6.3과 함께 bs4를 설치했습니다.

C:\yourfolderx\yourfoldery>python.exe -m pip install bs4

아래 사용자 게시물과 같은 구문을 사용합니다.

방금 Excel 용 패키지를 성공적으로 설치했습니다. Python 3.6을 설치 한 후 원하는 패키지를 다운로드 한 다음 설치해야합니다. 예를 들어,

python.exe -m pip download openpyxl==2.1.4

python.exe -m pip install openpyxl==2.1.4

파이썬 3.4 pip가 파이썬 설치에 포함되어 있기 때문에.


I just successfully installed a package for excel. After installing the python 3.6, you have to download the desired package, then install. For eg,

  1. python.exe -m pip download openpyxl==2.1.4

  2. python.exe -m pip install openpyxl==2.1.4


Yes, Python3.6 installs PIP but it is unreachable as it is installed. There is no code which will invoke it as it is! I have been at it for more than a week and I read every single advice given, without success!

Finally, I tested going to the pip directory and upgrading the installed version:

root@bx:/usr/local/lib/python3.6/site-packages # python -m pip install --upgrade pip

That command created a PIP which now works properly from any location on my FreeBSD server!

Clearly, the tools installed simply do not work, as installed with Python3.6. The only way to run them is to invoke Python and the desired python files as you can see in the command issued. Once the update is called, however, the new PIP works globally without having to invoke Python3.6...


This what worked for me on Amazon Linux

sudo yum list | grep python3

sudo yum install python36.x86_64 python36-tools.x86_64

$ python3 --version Python 3.6.8

$ pip -V pip 9.0.3 from /usr/lib/python2.7/dist-packages (python 2.7)

]$ sudo python3.6 -m pip install --upgrade pip Collecting pip Downloading https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl (1.4MB) 100% |████████████████████████████████| 1.4MB 969kB/s Installing collected packages: pip Found existing installation: pip 9.0.3 Uninstalling pip-9.0.3: Successfully uninstalled pip-9.0.3 Successfully installed pip-19.0.3

$ pip -V pip 19.0.3 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)


For python3 it should be pip3

on ubuntu

sudo apt install python3-pip

참고URL : https://stackoverflow.com/questions/43304612/how-to-install-pip-on-python-3-6

반응형