在Docker中的ubuntu中安裝Python3和Pip的問題
1)下載ubuntu鏡像
docker pull ubuntu
2)查看鏡像
docker images
3)運(yùn)行容器
docker run -itd --name ubuntu-test ubuntu
4)進(jìn)入容器
sudo docker exec -it ubuntu-test /bin/bash
5)更新源
apt-get update
如果不進(jìn)行這一步的話,有可能會(huì)出現(xiàn)這樣的問題:
Reading package lists... DoneBuilding dependency treeReading state information... DoneE: Unable to locate package Python
運(yùn)行一次即可6)安裝python3
apt-get install python3
7)安裝pip3
apt-get install python3-pip
8)測試
pip3 install numpyCollecting numpy Downloading numpy-1.20.1-cp38-cp38-manylinux2010_x86_64.whl (15.4 MB) |????????????????????????????????| 15.4 MB 1.9 MB/sInstalling collected packages: numpySuccessfully installed numpy-1.20.1
到此這篇關(guān)于在Docker中的ubuntu中安裝Python3和Pip的問題的文章就介紹到這了,更多相關(guān)Docker ubuntu安裝Python3和Pip內(nèi)容請搜索好吧啦網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持好吧啦網(wǎng)!
相關(guān)文章:
1. Springboot Druid 自定義加密數(shù)據(jù)庫密碼的幾種方案2. 詳解Android studio 動(dòng)態(tài)fragment的用法3. 解決Android studio xml界面無法預(yù)覽問題4. Spring Boot和Thymeleaf整合結(jié)合JPA實(shí)現(xiàn)分頁效果(實(shí)例代碼)5. 什么是python的自省6. Vuex localStorage的具體使用7. php模擬實(shí)現(xiàn)斗地主發(fā)牌8. Spring MVC+ajax進(jìn)行信息驗(yàn)證的方法9. Vue封裝一個(gè)TodoList的案例與瀏覽器本地緩存的應(yīng)用實(shí)現(xiàn)10. 使用Android studio查看Kotlin的字節(jié)碼教程

網(wǎng)公網(wǎng)安備