English 中文(简体)
难道找不到一个符合火rch要求的文本吗?
原标题:Could not find a version that satisfies the requirement torch>=1.0.0?
  • 时间:2019-05-21 13:23:53
  •  标签:
  • python

Could not find a version that satisfies the requirement torch>=1.0.0 No matching distribution found for torch>=1.0.0 (from stanfordnlp)

问题回答

如果你的沙尔文过于新鲜,这种情况也会发生。 Pytorch目前does不支持过去的3.7.9

资料来源:

这是最新的护法。

pip install torch===1.4.0 torchvision===0.5.0 -f https://download.pytorch.org/whl/torch_stable.html

我也遇到了一些困难。 我必须采取的步骤是:

最新版本的火rch:

 pip3 install torch===1.3.1 torchvision===0.4.2 -f https://download.pytorch.org/whl/torch_stable.html

Make sure you are installing with 64bit python version; otherwise, it won t work

最后,通过约翰·雷德评论和 se尔06的答复,我得以解决这一问题。 在此,我做了以下工作:

  1. Install Python 3.7.9 and not newer.
  2. BUT make sure to install 64bits python

所有其他组合都失败了我。

我试图将火rch2.1.0安装到3.12.0中,并且有同样的错误。 它转而火rch,像“ block上最新鲜的 p”。 降级为3.1.1,安装成功。

对于以略为新版本的猪和粉刷来访问这一问题的人,我有Python 3.8.3 32-bit,即使粉碎页指出:

目前,Windows上的Py Torch只支持3.7-3.9;

Installing Python 3.9.13 64-bit instead of Python 3.8.3 32-bit solved it for me.
After that, I used the install script generator and ran
python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
... and it started downloading.

Use 64-Bit-030. Py Torch don t与32-Bpill合作。 我也有同样的问题。

如果你已经安装了3.7on,同时安装了更新的版本,那么可以使用下面的指令安装火rch,使用3.7on。

py -3.7 -m pip install torch

但也注意到,你必须使用Python方案,使用Py-3.7。

py -3.7 program_name.py

torch and torchvision need python 3.8.x ... so in your CLI run

python --version

to get the python version. make sure that your environment has python 3.8.x, otherwise, create another virtual environment with anaconda

conda create -n myenv python==3.8 anaconda
conda activate myenv

然后由该指挥部安装火rch和火rch

pip install torch===1.5.0 torchvision===0.6.0 -f https://download.pytorch.org/whl/torch_stable.html

有一个与Python3.12有关的问题。 因此,我需要将其降为平时3.11。

brew uninstall python

brew install [email protected]

pip install torch===2.1.0 torchvision===0.16.0 -f https://download.pytorch.org/whl/torch_stable.html

这在MacOS对我课以罚款。

我尝试了视窗的所有可能指挥,但没有任何工作。 我也尝试使用Pycharm包裹,所有东西都留下同样的错误。

最后使用Anaconda安装了Pytorch。

I want to pip install " torch>=1.4.0, torchvision>=0.5.0 ", but in a conda env with python=3.0, this is not right. I tried create a new conda env with python=3.7, and pip install " torch>=1.4.0, torchvision>=0.5.0 " again, it is ok.

我的问题与3.8.2一样,目前由Py Torch支持。 缩略语 从19.2.3至22.3.1版本解决了我的问题:

pip install --upgrade pip

3.7.9 使用虚拟环境

Go to the python version download page (with binary installers) https://www.python.org/downloads/release/python-379/

Go to that page and download Windows x86-64 embeddable zip file extracted the zip file and placed the contents inside the project folder.

Then used,

virtualenv --python .python379python.exe env

To create the virtual environment by specifying the exe location.

现在可以使用<代码>.env式启动,你应当能够安装。

If you get any error like virtualenv: The term virtualenv is not recognized as a name of a cmdlet, uninstall virtualenv using pip uninstall virtualenv, close the terminal, open terminal as Administrator / root user and install again.

i have installed with python 3.9 version by running below commands:

py -3.9 -m pip置放火 to

I did follow many suggestions in this thread by installing python 3.7 and python 3.9 ( the one I have by default on my machine is 3.11). The only thing that worked for me is to install the 3.8 version using pyenv and install pytorch from there. Here is the code :

# install python 3.8
pyenv install 3.8

# switch to python 3.8
pyenv shell 3.8

# install pytorch
pip3 install torch torchvision torchaudio

令我感到惊讶的是,我使用了3.6枚,我掌握了这一指挥。

pip install torch===1.6.0 torchvision===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

If you are having this issue: try to check if you have any issues with apt_pkg,

  • Before downgrading to a lower version, try this command sudo apt install --reinstall python3 python python3-minimal --fix-broken

在我的案件中:我有3.12,错误是穿透_。

Try:

pip install torch

它为我工作。





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签