How do I specify a minimum package version in pipit setup.cfg - pip

I am trying to specify a minimum package version in a pypi setup.cfg file. I have written this:
install_requires =
cocotb>=1.5.2
But I get this error message when I test my package installation:
ERROR: Could not find a version that satisfies the requirement cocotb>=1.5.2 (from pyuvm) (from versions: 1.0.20170128)
ERROR: No matching distribution found for cocotb>=1.5.2
It seems to be using the version number as part of the package name. When I install cocotb manually I see the correct version:
(clean) (base) raysalemi#RayProMac pyuvm % pip list
Package Version
---------- -------
cocotb 1.5.2
All the help I've seen on this refers to the setup.py file, but I am working with the setup.cfg file. What is the syntax to specify a module and version?

The syntax is correct. The problem was that cocotb 1.5.2 is not on test.pypi.org

Related

Pip suddenly cant find or install any package

Suddenly pip cant install or find any package, it cant even figure out its own version.
I reinstalled python multiple times, i have the latest version of python 3 and pip. I also tried to clear pip cache. Nothing works, this is really annoying...
Errors:
>pip install redblacktree
ERROR: Could not find a version that satisfies the requirement redblacktree (from versions: none)
ERROR: No matching distribution found for redblacktree
WARNING: There was an error checking the latest version of pip
>pip config list
freeze.user='yes'
global.index-url='http://pypi.org/simple'
global.trusted-host='pypi.org'
install.user='yes'
list.user='yes'
uninstall.user='yes'
I fixed it by locating the pip.ini config file and removing the line index-url = http://pypi.org/simple

How to install YAML package in Pycharm (Python 3.8 / 3.9)?

How do I install the YAML package in Pycharm? I want to use it for a python 3.8 (or 3.9) project. When trying to install the package via the project settings I get the following error:
ERROR: Could not find a version that satisfies the requirement yaml
Alternatively I tried to search for any YAML package available via the command window by typing pip search yaml. Then I get the following error:
ERROR: XMLRPC request failed [code: -32500]
Any advice?
Thanks
pip install pyyaml
I think that this is what you are looking for: https://pypi.org/project/PyYAML/
It gets imported as import yaml

ERROR: Could not find a version that satisfies the requirement unittest (from versions: none) ERROR: No matching distribution found for unittest

Recently I have been installed Python 3.8.2 ( Feb 24, 2020) (64bit, Windows). Afterward, I've been updated Pip 20.0.2. And then trying to install Unittest" pip install unittest" but unfortunately it's appearing this message.
Does anyone has been faced this same problem?
C:\Users\BiploB>pip install unittest --user
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
ERROR: Could not find a version that satisfies the requirement unittest (from versions: none)
ERROR: No matching distribution found for unittest
enter link description here
If I am not mistaken unittest is part of Python's standard library. Meaning, it's available per default, meaning there is no need (and also no way) to install separately.

Issue installing Tax4Fun

I'm trying to install the package "Tax4Fun" but keep failing.
I've tried 2 different ways:
install.packages("devtools")
devtools::install_url("http://tax4fun.gobics.de/Tax4Fun/Tax4Fun_0.3.1.tar.gz")
library(Tax4Fun)
The error that I get is:
ERROR: dependency 'biom' is not available for package 'Tax4Fun'
I've also tried installing biom directly
BiocManager::install("biom")
which does not work either
Bioconductor version 3.10 (BiocManager 1.30.10), R 3.6.1 (2019-07-05)
Installing package(s) 'biom'
Installation path not writeable, unable to update packages: boot, foreign, KernSmooth,
mgcv, nlme, survival
Warning message:
package ‘biom’ is not available (for R version 3.6.1)
The other way I've tried to install Tax4Fun directly is
BiocManager::install("Tax4Fun")
I get the following error code:
Bioconductor version 3.10 (BiocManager 1.30.10), R 3.6.1 (2019-07-05)
Installing package(s) 'Tax4Fun'
Installation path not writeable, unable to update packages: boot, foreign, KernSmooth,
mgcv, nlme, survival
Warning message:
package ‘Tax4Fun’ is not available (for R version 3.6.1)
Please help :)
You need to install it by downloading the packages from source (http://tax4fun.gobics.de). Then it depends whether you are running on Linux/Mac or Windows.
From the command line, you navigate to the folder containing the .tar.gz downloaded package. Then you should install it using:
R CMD INSTALL Tax4Fun_0.3.1.tar.gz
But dependancies are not installed by default. So you need to install dependancies manually, Qiimer and Biom, which are both deprecated on Cran. You install them using the same command, after you have downloaded the packages from the Cran archives.
Before that, you need to also install their dependancies in R:
install.packages("pheatmap")
install.packages("RJSONIO")
Then you should be able to proceed as mentioned above: install Qiimer and Biom from the command line first. Then Tax4Fun from the command line too.
If you are running on Windows you should have quite the same issues, but the installation of the different packages and dependancies is different. You can have a look at the readme at http://tax4fun.gobics.de

ImportError: `save_model` requires h5py

I have windows 10. I am using python 3.5 and the following dependencies:
tensorflow==1.2.0
numpy==1.14.2
pandas==0.22.0
h5py==2.7.1
I download the code from this link: here
I am running it but I faced the following problem: ImportError: save_model requires h5py.
I google it I found that I need to install these dependencies:
List libhdf5
List h5py
h5py was installed, but libhdf5 can't:
Could not find a version that satisfies the requirement libhdf5 (from versions: )
No matching distribution found for libhdf5
Any help?

Resources