So I am trying to install pylint using pip, as my work machine is offline I have downloaded pylint using pip and transferred this using a CD. As part of pylint download it also brought down asteroid, colorama, isort, lazy_object_proxy, McCabe, six, typed ast and wrapt.
However when running the install for pylint using the following command inside the directory with all the above files in:
python -m pip install --no-index --find-links . -r requirements.txt
This starts to work with it collecting pylint, isort and a couple of others, however after collecting asteroid it goes to collect lazy object proxy (which is in the directory) and gives the following error:
Could not find a version that satisfies the requirement lazy-object-proxy (from asteroid<3,>=2.2.0->pylint->-r requirements.txt (line 1)) (from versions: ) No matching distribution found for lazy-object-proxy (from asteroid<3,>=2.2.0->pylint->-r requirements.txt (line 1))
The version of lazy object proxy downloaded is 1.4.1
Im fairly new to this so maybe there is something in this error that highlights why it doesn't see or like the version that is downloaded and in the directory, any help would be much appreciated.
OS is windows 7, running python version 3.6.0
NOTE: even trying to just install lazy object proxy on its own fails saying it doesn't exist, its like its not there although it is in the folder.
Related
I'm trying to use pip to download all the packages listed in a file and put them inside a directory. For this job, I need to download the latest version AND a specific version of that package (so I need to have the tar of the latest version of RANDOM-PACKAGE and the version 2.1.1 of RANDOM-PACKAGE inside this directory)
The command that I use is:
python3 -m pip download -r $FILE_TO_READ --dest $PACKAGES_DIR
This command works for python 3.6 (it gets all the packages without problems, last version AND specific version) but it doesn't work for Python 3.7 or more (I'm using the 3.9 version)
The specific error that I got with Python3.9 is:
ERROR: Double requirement given: contexter==0.1.4 (from -r /home/lab/working_environment/packages_to_update.txt (line 15)) (already in contexter (from -r /home/lab/working_environment/packages_to_update.txt (line 14)), name='contexter')
The file is a .txt file and its structured like this:
astpretty
bleach
blivet
bottle
build
certifi
cffi
chardet
charset-normalizer
colorama
commentjson
conan
configobj
contexter
contexter==0.1.4
cryptography
dasbus
dbus-python
decorator
How can I resolve this error without creating a separated file for the constraints, or using a parser for modify the file ?
The error shows that there is duplication in the contexter package, remove it and see if the issue has been resolved.
UPDATE:
try to use --no-deps flag in your script and see if it fixes the problem.
I have a requirements.txt that I'm pip installing from (pip install -r requirements.txt)
requirements.txt
numpy==1.18.2
pandas==1.1.4
requests==2.24.0
...
I'm getting a lot of errors with modules giving me this kind of error:
ERROR: Could not find a version that satisfies the requirement module==x.y.z
ERROR: No matching distribution found for module==x.y.z
So I'm debugging and I'd like to try using official download links instead of version numbers. I hope that I'm making sense, because I'm not too familiar with it yet but hopefully I'm being clear enough.
So instead of:
numpy==1.18.2
I would have:
numpy==https://pypi.org/project/numpy/1.23.0rc1/
I have distributed my Python project using setup.py sdisy, and I can locate my package in my system:
webcluster4u#ingestion-jenkins-vm:~/google-cloud-functions$ python3 -m pip list
Package Version
------------------------ ----------
...
file-ingestion 0.2
Now when I to run the command below I get an error:
webcluster4u#ingestion-jenkins-vm:~/google-cloud-functions$ python3 -m pip install -t /home/webcluster4u/google-cloud-functions/com/mahdi/python/functions/gcs/dependency file-ingestion
Collecting file-ingestion
Could not find a version that satisfies the requirement file-ingestion (from versions: )
No matching distribution found for file-ingestion
I am not sure what I am missing. Can anyone help me?
It is a bit strange that whenever I use the above command or use the file-ingestion in requirement.txt, I get the above message saying it cannot collect the package.
I've published a project to PyPI for the first time (https://pypi.org/project/xontrib-autojump/). But I get the following error when I try to install the project with this pip command:
$ pip install xontrib-autojump --user
Collecting xontrib-autojump
Could not find a version that satisfies the requirement xontrib-autojump (from versions: 0.1.linux-x86_64, 0.2.linux-x86_64, 0.3.linux-x86_64, 0.4.linux-x86_64)
No matching distribution found for xontrib-autojump
This project does appear when I run pip search xontrib-autojump:
$ pip search xontrib-autojump
xontrib-autojump (0.4) - autojump support for xonsh
...
Why can't I install this package with pip?
There are a number of possible problem areas - the main one is that it looks to me that you have not followed the naming convention needed to specify which python version the download is suitable for.
It is also a very good idea to set the metadata as this assist with finding packages.
The Packaging Tutorial is very helpful on this. It is also recommend that you test the upload and install process using the test instance of pypi.
The other big problem st that you "package" does not contain any python code and is not a python package in any way shape or form.
I am trying to install python packages from the local file system with pip as discussed in this question.
I have used pip2pi as suggested in the accepted answer in the above question.
dmanna#ubuntu:~$ mkdir -p pyt/pkg
dmanna#ubuntu:~$ pip2tgz pyt/pkg/ patroni[zookeeper]
The downloaded packages
dmanna#ubuntu:~$ ls /home/dmanna/pyt/pkg/
cdiff-1.0.tar.gz
certifi-2018.4.16-py2.py3-none-any.whl
chardet-3.0.4-py2.py3-none-any.whl
click-6.7-py2.py3-none-any.whl
idna-2.7-py2.py3-none-any.whl
kazoo-2.5.0-py2.py3-none-any.whl
patroni-1.4.4.tar.gz
prettytable-0.7.2.tar.bz2
psutil-5.4.6.tar.gz
psycopg2-2.7.4.tar.gz
python_dateutil-2.7.3-py2.py3-none-any.whl
pytz-2018.4-py2.py3-none-any.whl
PyYAML-3.12.tar.gz
requests-2.19.1-py2.py3-none-any.whl
six-1.11.0-py2.py3-none-any.whl
tzlocal-1.5.1.tar.gz
urllib3-1.23-py2.py3-none-any.whl
Then when I am trying to install the required package from the above local directory. It is giving me the below error
dmanna#ubuntu:~$ sudo pip install --no-index --find-links=pyt/pkg/patroni-1.4.4.tar.gz patroni[zookeeper]
Ignoring indexes: https://pypi.python.org/simple/
Downloading/unpacking patroni[zookeeper]
Running setup.py (path:/tmp/pip_build_root/patroni/setup.py) egg_info for package patroni
Installing extra requirements: 'zookeeper'
Downloading/unpacking urllib3>=1.19.1,!=1.21 (from patroni[zookeeper])
Could not find any downloads that satisfy the requirement urllib3>=1.19.1,!=1.21 (from patroni[zookeeper])
Cleaning up...
No distributions at all found for urllib3>=1.19.1,!=1.21 (from patroni[zookeeper])
Storing debug log for failure in /home/dmanna/.pip/pip.log
Can someone let me know what I am doing wrong?
Python - 2.7.6
PIP - 1.5.4
Ubuntu 14.04
--find-links=pyt/pkg
Find links in the directory, not in the patroni-1.4.4.tar.gz archive.