If I publish a package A on pypi that depends on package B on test-pypi, how to make user able to run pip install A instead of pip install -i https://pypi.org/simple/ --extra-index-url https://test.pypi.org/simple/ PACKAGE_NAME?
Related
I am transitioning from requirements.txt to pyproject.toml
In it I specified a list of required packages in project.dependencies, and the same list + additional packages in build-system.requires.
However if I run:
python -m pip install .
It seems to install only packages listed in project.dependencies
How do I tell pip to install all packages listed in build-system.requires ?
Is there any way to force install a pip python package ignoring all it's dependencies that cannot be satisfied?
(I don't care how "wrong" it is to do so, I just need to do it, any logic and reasoning aside...)
pip has a --no-dependencies switch. You should use that.
For more information, run pip install -h, where you'll see this line:
--no-deps, --no-dependencies
Ignore package dependencies
Try the following:
pip install --no-deps <LIB_NAME>
or
pip install --no-dependencies <LIB_NAME>
or
pip install --no-deps -r requirements.txt
or
pip install --no-dependencies -r requirements.txt
When I was trying install librosa package with pip (pip install librosa), this error appeared:
ERROR: Cannot uninstall 'llvmlite'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
I tried to remove llvmlite, but pip uninstall could not remove it. So, I used capability of ignore of pip by this code:
pip install librosa --ignore-installed llvmlite
Indeed, you can use this rule for ignoring a package you don't want to consider:
pip install {package you want to install} --ignore-installed {installed package you don't want to consider}
I am trying to install a package built by myself, but there is a package with same name on PYPI.
I tried with pip install my_package==1.2.0 --find-links page_html_with_link_to_package, but it downloaded the package from PYPI with same version 1.2.0.
Then I tried with pip install my_package==1.2.0 --find-links page_html_with_link_to_package --no-index, and it downloaded my package.
It's that normal? And if there is any other ways to download my package without --no-index?
Thanks!
Yes, this is normal. Check these examples below on official documentation of pip install, example 9. Install from alternative package repositories > Install from a local flat directory containing archives (and don’t scan indexes):
pip install --no-index --find-links=file:///local/dir/ SomePackage
pip install --no-index --find-links=/local/dir/ SomePackage
pip install --no-index --find-links=relative/dir/ SomePackage
or if you have it hosted somewhere else, then you can just use:
pip install --index-url http://my.package.repo/simple/ SomePackage
installing with sudo python setup.py install goes to /Library/Frameworks/Python.framework/Versions/2.7/bin/git-maildiff
while if I install using pip command sudo pip install maildif
it goes to different location i.e. /Library/Python/2.7/site-packages/
why is it like that ?
Is there any way to force install a pip python package ignoring all it's dependencies that cannot be satisfied?
(I don't care how "wrong" it is to do so, I just need to do it, any logic and reasoning aside...)
pip has a --no-dependencies switch. You should use that.
For more information, run pip install -h, where you'll see this line:
--no-deps, --no-dependencies
Ignore package dependencies
Try the following:
pip install --no-deps <LIB_NAME>
or
pip install --no-dependencies <LIB_NAME>
or
pip install --no-deps -r requirements.txt
or
pip install --no-dependencies -r requirements.txt
When I was trying install librosa package with pip (pip install librosa), this error appeared:
ERROR: Cannot uninstall 'llvmlite'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
I tried to remove llvmlite, but pip uninstall could not remove it. So, I used capability of ignore of pip by this code:
pip install librosa --ignore-installed llvmlite
Indeed, you can use this rule for ignoring a package you don't want to consider:
pip install {package you want to install} --ignore-installed {installed package you don't want to consider}