패키지를 설치하고 싶다면,
wlhunag: ~ $ pip install django
The program 'pip' is currently not installed. You can install it by typing:
sudo apt-get install python-pip
wlhunag: ~ $
수동으로 줄을 입력하지 않고 필수 패키지를 설치하는 빠른 방법이 있는지 궁금합니다.
sudo apt-get install python-pip
답변1
찾을 수 없는 명령에서 비롯되며 쉘 스크립트에서 실행됩니다... 따라서 쉘 기능을 수정하여 "설치하시겠습니까?" 프롬프트를 표시하거나 변수에 유지할 수 있습니다(그래서 가능) d 그런 다음 그냥 입력 $doINST
하거나 다른 것을 입력하세요). 또는 history -s
기록에 추가하는 데 사용하고 위쪽 화살표 키를 누르기만 하면 됩니다.
답변2
잘라내기 및 붙여넣기는 가장 빠른 설치 패키지입니다. 그놈 터미널에 있는 경우 해당 줄을 세 번 클릭한 다음 + + (복사), + + (붙여넣기)를 sudo apt-get ...
누른 다음 누를 수 있습니다.CtrlShiftCCtrlShiftVReturn
그러나 귀하의 경우에는 다음을 권장합니다.
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
그래서 당신은최신 버전, 를 사용하여 설치할 때 얻은 저장소에 없을 수도 있습니다 apt-get
.
Python 2.7.9 또는 3.4 시리즈가 있는 경우 다음 항목 pip
에 포함되어 있습니다 .분배하다그리고 설치할 필요도 없습니다.
답변3
확인하다 aptsh
. 방금 우연히 발견했습니다. 예제 세션(셸에서 탭을 클릭하면 스마트 탭 완성이 수행됨):
root@orwell:/home/faheem# aptsh
Generating and mapping caches...
Reading commands history...
aptsh>
add depends dump-cfg madison queue* show unmet
autoclean dist-upgrade dumpavail news quit showpkg update
build-dep dotty help* orphans* rdepends showsrc upgrade
changelog dpkg* install pkgnames remove source whatis
check dselect-upgrade listfiles policy rls stats whichpkg
clean dump ls purge search toupgrade
aptsh> install octave
Display all 113 possibilities? (y or n)
octave octave-fpl octave-miscellaneous octave-plot octave-zenity
octave-ad octave-ftp octave-missing-functions octave-plplot octave2.0-emacsen
octave-ann octave-ga octave-mpi octave-psychtoolbox-3 octave2.0-htmldoc
octave-audio octave-gdf octave-msh octave-quaternion octave2.0-info
octave-benchmark octave-general octave-multicore octave-secs1d octave3.0
octave-bim octave-geometry octave-nan octave-secs2d octave3.0-info
octave-bioinfo octave-gmt octave-nlopt octave-signal octave3.1
octave-biosig octave-gsl octave-nlwing2 octave-simp octave3.1-doc
octave-combinatorics octave-headers octave-nnet octave-sockets octave3.1-emacsen
octave-common octave-htmldoc octave-nurbs octave-sp octave3.1-headers
octave-communications octave-ident octave-ocs octave-specfun octave3.1-htmldoc
octave-communications-common octave-image octave-octcdf octave-splines octave3.1-info
octave-control octave-info octave-octgpr octave-statistics octave3.2
octave-data-smoothing octave-informationtheory octave-odepkg octave-strings octave3.2-common
octave-dataframe octave-integration octave-openmpi-ext octave-struct octave3.2-dbg
octave-dbg octave-io octave-optim octave-sundials octave3.2-doc
octave-dicom octave-irsa octave-optiminterp octave-symband octave3.2-emacsen
octave-doc octave-java octave-outliers octave-symbolic octave3.2-headers
octave-econometrics octave-lhapdf octave-parallel octave-time octave3.2-htmldoc
octave-emacsen octave-linear-algebra octave-pdb octave-tsa octave3.2-info
octave-epstk octave-ltfat octave-pfstools octave-vlfeat octavede
octave-financial octave-ltfat-common octave-physicalconstants octave-vrml
octave-fixed octave-mapping octave-pkg-dev octave-xraylib
aptsh> install octave-
octave-ad octave-epstk octave-irsa octave-octgpr octave-sockets
octave-ann octave-financial octave-java octave-odepkg octave-sp
octave-audio octave-fixed octave-lhapdf octave-openmpi-ext octave-specfun
octave-benchmark octave-fpl octave-linear-algebra octave-optim octave-splines
octave-bim octave-ftp octave-ltfat octave-optiminterp octave-statistics
octave-bioinfo octave-ga octave-ltfat-common octave-outliers octave-strings
octave-biosig octave-gdf octave-mapping octave-parallel octave-struct
octave-combinatorics octave-general octave-miscellaneous octave-pdb octave-sundials
octave-common octave-geometry octave-missing-functions octave-pfstools octave-symband
octave-communications octave-gmt octave-mpi octave-physicalconstants octave-symbolic
octave-communications-common octave-gsl octave-msh octave-pkg-dev octave-time
octave-control octave-headers octave-multicore octave-plot octave-tsa
octave-data-smoothing octave-htmldoc octave-nan octave-plplot octave-vlfeat
octave-dataframe octave-ident octave-nlopt octave-psychtoolbox-3 octave-vrml
octave-dbg octave-image octave-nlwing2 octave-quaternion octave-xraylib
octave-dicom octave-info octave-nnet octave-secs1d octave-zenity
octave-doc octave-informationtheory octave-nurbs octave-secs2d
octave-econometrics octave-integration octave-ocs octave-signal
octave-emacsen octave-io octave-octcdf octave-simp
aptsh> install octave-io
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
gnuplot-x11 libatlas3-base libcamd2.2.0 libccolamd2.7.1 libcholmod1.7.1 libcxsparse2.2.3 libgl2ps0 libglpk0 libjexcelapi-java liboctave1 libqhull5
libqrupdate1 octave octave-common octave-java
Suggested packages:
gnuplot-doc libiodbc2-dev libmysqlclient-dev octave-info octave-doc octave-htmldoc
The following packages will be REMOVED:
gnuplot-nox
The following NEW packages will be installed:
gnuplot-x11 libatlas3-base libcamd2.2.0 libccolamd2.7.1 libcholmod1.7.1 libcxsparse2.2.3 libgl2ps0 libglpk0 libjexcelapi-java liboctave1 libqhull5
libqrupdate1 octave octave-common octave-io octave-java
0 upgraded, 16 newly installed, 1 to remove and 1 not upgraded.
Need to get 9,850 kB/22.1 MB of archives.
After this operation, 64.6 MB of additional disk space will be used.
Do you want to continue [Y/n]?
답변4
Bash를 사용하는 경우 다음을 추가할 수 있습니다.
alias api='sudo apt-get install'
또는
alias api='sudo aptitude install'
API "패키지 이름"만 입력하면 됩니다. 또는 Python만 찾고 있다면 여기에 있는 아나콘다를 설치할 수 있습니다.https://store.continuum.io/cshop/anaconda/
그런 다음 conda update를 사용하여 anaconda에서 발견된 모든 패키지를 업데이트할 수 있습니다.