How to install torch==0.3.1 in python=3.6 - python-3.x

I am trying to install deepmatcher package in python 3.6. To let this package to run in python you need have a torch==0.3.1 version. So I am trying to install torch==0.3.1 by running :
pip install torch==0.3.1
Error during installation:
Collecting torch==0.3.1
ERROR: Could not find a version that satisfies the requirement torch==0.3.1 (from versions: 0.1.2, 0.1.2.post1)
ERROR: No matching distribution found for torch==0.3.1
I even tried installing it using "peterjc123" package but still unable to uninstall it.

torch 0.3.1 is not listed official anymore. To install torch 0.3.1 one can either build it by source or using a whl file for the specific version.
Using a whl file
whl files can be found here provided by pytorch
The downloaded file can then be installed with pip install [path to downloaded file]
Build by source
To build torch by source one can checkout the desired version via git
git checkout v[version number]
For torch==0.3.1 this would be git checkout v0.3.1
After this follow the install instructions provided by README.md
More information can be found at: https://pytorch.org/get-started/previous-versions/

check if you have right python installed for you os architecture or
create a virtual env using conda and then try installing its better this way

Related

How to install shapely via .whl when "not supported wheel on this platform"

all. I am trying to install shapely via the .whl using pip. I have python 3.6.13 running on anaconda prompt. I have downloaded the shapely .whl using this site. However, when I run the commands shown in the image below, I get the error "shapely... is not a supported wheel on this platform."
From what I understand, I have a 64 bit architecture and python 3.6 (although it is python 3.6.13). I have tried to just request python 3.6 flat from the virtual environment setup by using the following command:
conda create -n stormEnv python=3.6
However, this command always returns a python version that is higher than a flat 3.6.
I am wondering if there is a way to get a python version that is a flat 3.6, or if I am just using the wrong .whl file from https://www.lfd.uci.edu/~gohlke/pythonlibs/
I have also tried the 3.6 32bit architecture as shown in the next image without any success:
Thanks for any help you can provide.
Since you're working with conda, the first thing you should try is:
conda install shapely
There is likely to be an existing build for your platform available in conda forge.
Wheel files are tagged with compatibility markers, and you should not attempt to install an incompatible wheel directly, because the the compiled artifacts inside the wheel will not work on your platform. You'll have to find a wheel which is supported on your platform - to see the list of supported tags run:
python -m pip debug -v
If there are no compatible wheels available, you'll have to install the necessary build dependencies and then install directly from source code.

How to install libdoc2testbench on Ubuntu

libdoc2testbench is a tool of Robot Framework which supports importing test results to imbus testbench. Due to Robot Framework documentation, it is to be installed by
pip install robotframework-libdoc2testbench
I want to install it on Ubuntu 18.04; there I get the error:
Could not find a version that satisfies the requirement robotframework-libdoc2testbench (from versions: )
No matching distribution found for robotframework-libdoc2testbench
Best regards
Gerhard
You are probably calling pip from Python 2.7.
Make sure you use Python 3, for example with:
python3 -m pip install robotframework-libdoc2testbench
EDIT: You can download the .wheel or source tar from pypi.org and install with pip pointing to it (and then if needed, download other required packages).
However the solution to your problem is the Python version. From the project page, we see it needs Python 3.7.

Could not find a version that satisfies the requirement MetaTrader5

I am trying to install a python package MetaTrader5 using the command
python3 -m pip install MetaTrader5
and I have even tried
pip install MetaTrader5
But it throws the following error
ERROR: Could not find a version that satisfies the requirement MetaTrader5 (from versions: none)
ERROR: No matching distribution found for MetaTrader5
I am using
Ubuntu 16.04.6
Python 3.6.10
can someone help with this?
I have a mac. On it I have conda installed on MacOS. In addition I have a virtual machine running windows and I have also installed conda on Windows. I could install MetaTrader5 package using pip on the virtual machine but not on MacOS.
According to this Youtube video, MetaTrader5 currently doesn't support Ubuntu. It's only available on Windows.
If you look at Pypy and view the wheel files, you will see that all the builds are for Windows. pip is refusing to install because it can't find a Mac or Linux version.
https://pypi.org/project/MetaTrader5/5.0.37/#files
Download python version 3.10.0 then try installing metatrader5.
here the link: https://www.python.org/downloads/release/python-3100/
Metatrader 5 for Python, only work in exact versions:
Install one of version below to MT5 works.
Python Versions for Metatrader5

No matching distribution found when installing from local python index

I'm trying to install packages from local package index. I have a package named scikit_image-0.14.0-cp35-cp35m-manylinux1_x86_64. In pip requirements file the package is defined as scikit-image==0.14.0. When i try to run
pip install --index my_url requirements.cfg
I get Error: "No matching distribution found for pip_requirements.cfg".
When i install from PyPI all works well. Am I missing something?
The command you posted is trying to install the requirements.cfg project, which doesn't exist. Perhaps you mean:
$ pip install --index my_url -r requirements.cfg
to install from a requirements file called requirements.cfg?

setuptools, use package on local system instead of getting it from PyPI

There is an open-source python package that I want to work on (toga-android). To test the code I write, I have to be able to build my own project that has said open-source package as a dependency. My project has to be built with setuptools, so I need setuptools to fulfill the dependency using my version of the package, and not get the package from PyPI.
The problem is that setuptools always gets the package from PyPI.
Whenever I build with setuptools I see:
Collecting toga-android==0.3.0.dev8
Downloading https://files.pythonhosted.org/packages/92/fe/348a39e2e0bbcac2d3ed511dd2b62943b488e7dcb8097c437416caf1c179/toga_android-0.3.0.dev8-py3-none-any.whl
or
Collecting toga-android==0.3.0.dev8
Using cached https://files.pythonhosted.org/packages/92/fe/348a39e2e0bbcac2d3ed511dd2b62943b488e7dcb8097c437416caf1c179/toga_android-0.3.0.dev8-py3-none-any.whl
Clearly it is getting the package from PyPI or using a cached version from it.
I have installed my version using pip install -e . , and that has no effect. I have also tried including the package's source in my project's directory with setup.py. Setuptools apparently includes this code because syntax errors there make the build fail, but it doesn't recognize that it can satisfy the dependency. It still gets the package from PyPI and any modules imported from the package are the PyPI versions.
How can I use of custom version of a package that is also in PyPI as a setuptools dependency?
Steps to reproduce:
pip install briefcase (using or not using virtualenv does not matter)
git clone https://github.com/pybee/toga.git
cd ~/toga/src/core; sudo pip install -e .
cd ~/toga/src/android/; sudo pip install -e .
cd ~/toga/examples/tutorial0
python setup.py android
The output will show that an older version of toga-android is downloaded even though it was already installed with pip.

Resources