Open huskier opened 8 months ago
You're using --no-deps
, which explicitly says not to install the dependencies...
pip install something
is a command to install packages (distributions) in your current python environment. It is not a project management command and does not read configuration from the current directory, like a build tool does (including pip when used like pip install .
)
Aside: I want to add that it is a good idea to not install dependencies if you use Test PyPI as main (and only) index.
What you maybe could do is use a command like this:
python -m pip install \
--extra-index-url https://test.pypi.org/simple/ \
minimalcadquery==0.0.3
This assumes that minimalcadquery==0.0.3
is available only on Test PyPI.
This maybe would prevent downloading (and installing) anything else than minimalcadquery==0.0.3
from Test PyPI. Things on Test PyPI are not really trustworthy, I would not install anything from there except the one particular thing that I just uploaded myself.
Thanks all of you, @pfmoore @merwok @sinoroc.
One more question, when I use the following line to install minimalcadquery(0.0.4) with dependencies,
python -m pip install --index-url https://test.pypi.org/simple/ minimalcadquery==0.0.4
There is an error output:
ERROR: Could not find a version that satisfies the requirement multimethod==1.9.1 (from minimalcadquery) (from versions: none)
However, I could install multimethod (1.9.1) with the following single line.
pip install multimethod==1.9.1
Besides multimethod package, other packages have the same issue.
Does
pip install --index-url https://test.pypi.org/simple/ multimethod==1.9.1
work? I would assume not, since you are not allowing pip to access PyPI, only test PyPI. --extra-index-url
allows pip to access both.
Test PyPI does not have the full content of PyPI, and it's not really intended for installing your application from. As @henryiii says, multimethod
probably isn't on test PyPI (it isn't, I checked 😉)
Thank you henryiii and pfmoore. @henryiii @pfmoore
Actually, I've read the option of "--index-url" at site of pip finding packages.
pip looks for packages in a number of places: on PyPI (if not disabled via --no-index), in the local filesystem, and in any additional repositories specified via --find-links or --index-url. There is no ordering in the locations that are searched. Rather they are all checked, and the “best” match for the requirements (in terms of version number - see the specification for details) is selected.
I think that pip will look for packages from PyPI site on top of TestPyPI. I was wrong, and "--extra-index-url" should be used here.
IMO that's confusing, and I'd have come to the same conclusion. I think maybe that could be updated?
pip looks for packages in a number of places: on PyPI (or whatever is given as --index-url, if not disabled via --no-index), in the local filesystem, and in any additional repositories specified via --find-links or --extra-index-url. There is no ordering in the locations that are searched. Rather they are all checked, and the “best” match for the requirements (in terms of version number - see the specification for details) is selected.
For example?
@henryiii Yes, your update is more clear. Thanks.
Problem description
I've just finished building and uploading my test python package "minimalcadquery", and it is here: MinimalCadQuery
When I try to install it from a virtual python environment with the following command
python -m pip install --index-url https://test.pypi.org/simple/ --no-deps minimalcadquery
pip has just installed minimalcadquery, but ignored the dependencies in the project section in the pyproject.toml file. So I cannot use the minimalcadquery at all.I wonder What is wrong with the dependencies?
The project section looks like: