pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

為什么 python 使用 3.8.1 和 3.9,然后無法安裝包

Why is python using 3.8.1 and 3.9, then fail to install packages (ERROR: Package pkg requires a different Python: 3.8.1 not in #39;gt;=3.9.0#39;)?(為什么 python 使用 3.8.1 和 3.9,然后無法安裝包(錯誤:包 pkg 需要不同的 P
本文介紹了為什么 python 使用 3.8.1 和 3.9,然后無法安裝包(錯誤:包 pkg 需要不同的 Python:3.8.1 不在 '>=3.9.0' 中)?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在嘗試測試 我的 Ultimate-utils 庫的安裝,我得到了這個奇怪的錯誤:

I was trying to test the installation of my ultimate-utils library and I get this bizzare error:

(meta_learning) brandomiranda~/ultimate-utils ? pip install -e .
Obtaining file:///Users/brandomiranda/ultimate-utils
  Preparing metadata (setup.py) ... done
Collecting dill
  Using cached dill-0.3.4-py2.py3-none-any.whl (86 kB)
Collecting networkx>=2.5
  Using cached networkx-2.6.3-py3-none-any.whl (1.9 MB)
Requirement already satisfied: scipy in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from ultimate-utils==0.5.3) (1.7.3)
Collecting scikit-learn
  Using cached scikit_learn-1.0.1-cp38-cp38-macosx_10_13_x86_64.whl (7.9 MB)
Collecting lark-parser
  Using cached lark_parser-0.12.0-py2.py3-none-any.whl (103 kB)
Collecting torchtext==0.10.1
  Using cached torchtext-0.10.1-cp38-cp38-macosx_10_9_x86_64.whl (1.6 MB)
Collecting tensorboard
  Using cached tensorboard-2.7.0-py3-none-any.whl (5.8 MB)
Collecting pandas
  Using cached pandas-1.3.4-cp38-cp38-macosx_10_9_x86_64.whl (11.4 MB)
Collecting progressbar2
  Using cached progressbar2-3.55.0-py2.py3-none-any.whl (26 kB)
Collecting transformers
  Using cached transformers-4.13.0-py3-none-any.whl (3.3 MB)
Requirement already satisfied: requests in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from ultimate-utils==0.5.3) (2.26.0)
Collecting aiohttp
  Using cached aiohttp-3.8.1-cp38-cp38-macosx_10_9_x86_64.whl (574 kB)
Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from ultimate-utils==0.5.3) (1.21.4)
Collecting plotly
  Using cached plotly-5.4.0-py2.py3-none-any.whl (25.3 MB)
Collecting wandb
  Using cached wandb-0.12.7-py2.py3-none-any.whl (1.7 MB)
Collecting matplotlib
  Using cached matplotlib-3.5.0-cp38-cp38-macosx_10_9_x86_64.whl (7.3 MB)
Requirement already satisfied: torch<1.10.0,>=1.4.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from ultimate-utils==0.5.3) (1.9.1)
Requirement already satisfied: torchvision<0.11.0,>=0.5.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from ultimate-utils==0.5.3) (0.10.1)
Requirement already satisfied: torchaudio<0.10.0,>=0.9.1 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from ultimate-utils==0.5.3) (0.9.1)
ERROR: Package 'ultimate-utils' requires a different Python: 3.8.1 not in '>=3.9.0'

但是,如果您檢查依賴項似乎已正確安裝 - 所以我很困惑這條消息的含義.

however, if you check the dependencies seem to have installed correctly - so I am puzzled what this message means.

此外,如果您更仔細地閱讀該消息,您還會看到它出于某種原因引用了 3.8(python 3.8?不確定),請參閱:

In addition if you read the message more carefully you also see that it references 3.8 for some reason (python 3.8? not sure), see:

Requirement already satisfied: torch<1.10.0,>=1.4.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from ultimate-utils==0.5.3) (1.9.1)
Requirement already satisfied: torchvision<0.11.0,>=0.5.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from ultimate-utils==0.5.3) (0.10.1)
Requirement already satisfied: torchaudio<0.10.0,>=0.9.1 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from ultimate-utils==0.5.3) (0.9.1)
ERROR: Package 'ultimate-utils' requires a different Python: 3.8.1 not in '>=3.9.0'

但如果我要求 pythons 版本,它是我期望的 3.9:

but if I ask for pythons version its the one I expected 3.9:

(meta_learning) brandomiranda~/ultimate-utils ? python
Python 3.9.7 (default, Sep 16 2021, 08:50:36)
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

所以我很困惑到底發生了什么.我想知道pycharm是否與此有關.但是為什么說它沒有安裝我的 uutils 庫呢?

So I am very puzzled what is going on. I wonder if pycharm has anything to do with this. But why is it saying it did not install my uutils library?

檢查點子列表確認它不存在:

and checking the pip list confirms its not there:

(meta_learning) brandomiranda~/ultimate-utils ? pip list
Package                Version
---------------------- ---------
argcomplete            1.12.3
astroid                2.3.3
boto                   2.49.0
certifi                2021.10.8
cffi                   1.15.0
charset-normalizer     2.0.9
cloudpickle            2.0.0
crcmod                 1.7
cryptography           36.0.0
fasteners              0.16.3
gcs-oauth2-boto-plugin 3.0
google-apitools        0.5.32
google-reauth          0.1.1
gsutil                 5.5
gym                    0.21.0
httplib2               0.20.2
idna                   3.3
isort                  4.3.21
lazy-object-proxy      1.4.3
learn2learn            0.1.6
mccabe                 0.6.1
monotonic              1.6
nodejs                 0.1.1
numpy                  1.21.4
oauth2client           4.1.3
optional-django        0.1.0
Pillow                 8.4.0
pip                    21.3.1
pyasn1                 0.4.8
pyasn1-modules         0.2.8
pycparser              2.21
pylint                 2.4.4
pyOpenSSL              21.0.0
pyparsing              3.0.6
pyu2f                  0.1.5
qpth                   0.0.15
requests               2.26.0
retry-decorator        1.1.1
rsa                    4.7.2
scipy                  1.7.3
setuptools             41.2.0
six                    1.14.0
torch                  1.9.1
torchaudio             0.9.1
torchvision            0.10.1
tqdm                   4.62.3
typing_extensions      4.0.1
urllib3                1.26.7
wrapt                  1.11.2

從 uutils 運行導入確認它沒有安裝:

running an import from uutils confirms it was not installed:

(meta_learning) brandomiranda~/ultimate-utils ? python -c "import uutils; uutils.hello()"
python -c "import uutils; uutils.torch_uu.hello()"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'uutils'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'uutils'

奇怪的是,這在 python 3.9 之前已經有效.所以有些東西改變了,我不知道是什么.

what is bizzare is that this has worked before in python 3.9. So something changed and I can't figure out what.

這一定是python路徑問題,因為現在它在刪除python 3.8(我從未安裝過......)后打開了2.7.我認為 conda init 沒有正確啟動我的 shell.在哪里:

it must be a python path issue since now it's opening 2.7 after deleting python 3.8 (which I never installed...). I think conda init is not initiating my shell correctly. Where is:

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/brandomiranda/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/brandomiranda/miniconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/brandomiranda/miniconda3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/brandomiranda/miniconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

假設進入.zshrc文件?

參考/相關鏈接:

  • 無法安裝新的適用于 Python 的軟件包(Python 3.9.0、Windows 10)
  • 為什么 Pip 聲稱 Python 的版本不在給定范圍內?
  • 如何是否從 setup.py install_requires 列表中安裝 PyTorch 和相關工具?
  • https://github.com/brando90/ultimate-utils
  • Python OSX $ 其中 Python 提供/庫/Frameworks/Python.framework/Versions/2.7/bin/python
  • 為什么 conda init 更新我的 .bash_profile 不正確?
  • 如何從 macOS 完全卸載 Anaconda
  • https://superuser.com/questions/121870/how-do-i-reset-the-path-variable-on-mac-os-x
  • https://github.com/brando90/.dotfiles/blob/master/README.md

推薦答案

一旦我開始使用python 3.9(而不是3.10,可能使用最新版本的python 是一個壞主意,所以我學會了只落后大多數軟件版本以避免奇怪的錯誤)然后我確保我的 mac 的新默認 shell zsh 有一個全新的原始路徑:

Once I started using python 3.9 (and not 3.10, probably using the most recent version of python is a bad idea, so I learned to be just 1 behind most version of software to avoid weird bugs) and then I made sure my mac's new default shell zsh has a brand new virgin path:

PATH=/usr/bin:/bin:/usr/sbin:/sbin
export PATH

在它的頂部.

# In my 2013 mac this seems to be needed
PATH=/usr/bin:/bin:/usr/sbin:/sbin
export PATH

# let zplug manage itself
zplug "zplug/zplug"

## Plugins for zsh

# new `jump`
zplug "plugins/wd", from:oh-my-zsh

## prompt
## to test do: print -P '%B%F{red}co%F{green}lo%F{blue}rs%f%b'
# ref: http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Prompt-Expansion
# ref: reference: https://wiki.archlinux.org/index.php/Zsh#Colors
# ref: https://scriptingosx.com/2019/07/moving-to-zsh-06-customizing-the-zsh-prompt/
# %F{color} sets colour until next color of %f, %B infront of that changes tone

PROMPT="%B%F{magenta}%n%B%F{red}%~%B%F{green} %F{cyan}?%f "


## jump TODO: switch to zsh's wd

#conda activate metalearning
# conda activate synthesis
conda activate meta_learning

## Aliases
alias grep='grep --color=auto'
alias intel='ssh -i ~/.ssh/intel_id_rsa miranda9@ssh-iam.intel-research.net'
alias hal='ssh miranda9@hal.ncsa.illinois.edu'
alias vision='ssh miranda9@vision-submit.cs.illinois.edu'
alias nano='ssh miranda9@nano.ncsa.illinois.edu'
alias dgx='ssh miranda9@hal-dgx.ncsa.illinois.edu'
alias sshcc='ssh miranda9@cc-login.campuscluster.illinois.edu'

#alias tb='tensorboard --logdir'
alias tbb='sh /Users/brando/ultimate-utils/run_tb.sh'

export WANDB_API_KEY=MY SCRETE MUAHAHAHA

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/brandomiranda/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/brandomiranda/opt/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/brandomiranda/opt/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/brandomiranda/opt/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

我還重新安裝了 python,刪除了 python 框架 3.8 并重新安裝了 conda 作為圖形界面,但我不認為這些是讓事情起作用的東西.我相當有信心這是正確的.

I also reinstalled python, removed python framework 3.8 and reinstalled conda as a graphical interface but I don't think these were the things that made things work. I am fairly confident that is right.

這篇關于為什么 python 使用 3.8.1 和 3.9,然后無法安裝包(錯誤:包 pkg 需要不同的 Python:3.8.1 不在 '&gt;=3.9.0' 中)?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How to install Selenium in a conda environment?(如何在 conda 環境中安裝 Selenium?)
get the CUDA and CUDNN version on windows with Anaconda installe(使用 Anaconda installe 在 Windows 上獲取 CUDA 和 CUDNN 版本)
How can I download Anaconda for python 3.6(如何下載適用于 python 3.6 的 Anaconda)
Using two different Python Distributions(使用兩個不同的 Python 發行版)
How can I install Anaconda aside an existing pyenv installation on OSX?(除了 OSX 上現有的 pyenv 安裝之外,如何安裝 Anaconda?)
Permanently set Python path for Anaconda within Cygwin(在 Cygwin 中為 Anaconda 永久設置 Python 路徑)
主站蜘蛛池模板: 防火窗_耐火窗_防火门厂家_防火卷帘门-重庆三乐门业有限公司 | 青岛美佳乐清洁工程有限公司|青岛油烟管道清洗|酒店|企事业单位|学校工厂厨房|青岛油烟管道清洗 插针变压器-家用电器变压器-工业空调变压器-CD型电抗器-余姚市中驰电器有限公司 | 上海橡胶接头_弹簧减震器_金属软接头厂家-上海淞江集团 | 开平机_纵剪机厂家_开平机生产厂家|诚信互赢-泰安瑞烨精工机械制造有限公司 | 首页_中夏易经起名网| 温州中研白癜风专科_温州治疗白癜风_温州治疗白癜风医院哪家好_温州哪里治疗白癜风 | 成都租车_成都租车公司_成都租车网_众行宝 | 板框压滤机-隔膜压滤机配件生产厂家-陕西华星佳洋装备制造有限公司 | 底部填充胶_电子封装胶_芯片封装胶_芯片底部填充胶厂家-东莞汉思新材料 | 淘剧影院_海量最新电视剧,免费高清电影随心观看 | 产业规划_产业园区规划-产业投资选址及规划招商托管一体化服务商-中机院产业园区规划网 | 合肥角钢_合肥槽钢_安徽镀锌管厂家-昆瑟商贸有限公司 | 垃圾压缩设备_垃圾处理设备_智能移动式垃圾压缩设备--山东明莱环保设备有限公司 | 东莞螺杆空压机_永磁变频空压机_节能空压机_空压机工厂批发_深圳螺杆空压机_广州螺杆空压机_东莞空压机_空压机批发_东莞空压机工厂批发_东莞市文颖设备科技有限公司 | 金联宇电缆|广东金联宇电缆厂家_广东金联宇电缆实业有限公司 | 找培训机构_找学习课程_励普教育| 自动焊锡机_点胶机_螺丝机-锐驰机器人 | 工控机-图像采集卡-PoE网卡-人工智能-工业主板-深圳朗锐智科 | 香港新时代国际美容美发化妆美甲培训学校-26年培训经验,值得信赖! | 合肥角钢_合肥槽钢_安徽镀锌管厂家-昆瑟商贸有限公司 | 台式低速离心机-脱泡离心机-菌种摇床-常州市万丰仪器制造有限公司 | 斗式提升机_链式斗提机_带式斗提机厂家无锡市鸿诚输送机械有限公司 | 接地电阻测试仪[厂家直销]_电缆故障测试仪[精准定位]_耐压测试仪-武汉南电至诚电力设备 | 许昌奥仕达自动化设备有限公司| 螺旋绞龙叶片,螺旋输送机厂家,山东螺旋输送机-淄博长江机械制造有限公司 | 万濠投影仪_瑞士TRIMOS高度仪_尼康投影仪V12BDC|量子仪器 | 六维力传感器_六分量力传感器_模腔压力传感器-南京数智微传感科技有限公司 | 哈尔滨治「失眠/抑郁/焦虑症/精神心理」专科医院排行榜-京科脑康免费咨询 一对一诊疗 | 苹果售后维修点查询,苹果iPhone授权售后维修服务中心 – 修果网 拼装地板,悬浮地板厂家,悬浮式拼装运动地板-石家庄博超地板科技有限公司 | 北京晚会活动策划|北京节目录制后期剪辑|北京演播厅出租租赁-北京龙视星光文化传媒有限公司 | 台湾HIWIN上银直线模组|导轨滑块|TBI滚珠丝杆丝杠-深圳汉工 | 会议会展活动拍摄_年会庆典演出跟拍_摄影摄像直播-艾木传媒 | 粘度计,数显粘度计,指针旋转粘度计| 磁力抛光研磨机_超声波清洗机厂家_去毛刺设备-中锐达数控 | 齿轮减速马达一体式_蜗轮蜗杆减速机配电机-德国BOSERL齿轮减速电动机生产厂家 | 破碎机_上海破碎机_破碎机设备_破碎机厂家-上海山卓重工机械有限公司 | 东莞市超赞电子科技有限公司 全系列直插/贴片铝电解电容,电解电容,电容器 | 精密五金冲压件_深圳五金冲压厂_钣金加工厂_五金模具加工-诚瑞丰科技股份有限公司 | 不锈钢搅拌罐_高速搅拌罐厂家-无锡市凡格德化工装备科技有限公司 | 河南档案架,档案密集架,手动密集架,河南密集架批发/报价 | 烟台游艇培训,威海游艇培训-烟台市邮轮游艇行业协会 |