Using install_requires - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Using install_requires (/thread-15875.html) Pages:
1
2
|
Using install_requires - ChrisOfBristol - Feb-04-2019 I have created a test application which uses 'pillow'. I inserted a line in install.py: install_requires=['pillow']I then ran the following commands create the distribution and install it, they both worked: python setup.py sdist pip3 install dist/*.tar.gzI now want to take another step and include 'hugin-tools', so I added it to install.py as above, and also put 'hugin-tools' in requirements.txt. I then ran the commands to create the distribution and install it, and the creation runs, but the installation errors: Clearly it can't find hugin-tools, how should I correctly indicate to pip3 where to find it?
RE: Using install_requires - buran - Feb-04-2019 where from you are supposed to get this hugin-tools package? Can you provide link? as you can see it's not available on pypi (https://pypi.org/search/?q=hugin) Looking at http://hugin.sourceforge.net/docs/manual/Hugin_Scripting_Interface.html - maybe you want this one https://pypi.org/project/HSI/ RE: Using install_requires - ChrisOfBristol - Feb-04-2019 I have downloaded and unzipped camocomp and panorama as they both suggest that they use hugin, but I can't see how they include it. RE: Using install_requires - buran - Feb-04-2019 I would suggest to use HSI - it's the one referred on their page and is updated April 2018. panorama is updated in 2017. If you look at the github repo it uses subprocess to call hugin via CLI. As it is not updated since 2017 it may have problems with latest versions of python. camocomp is updated in 2013 so I would guess it's long time dead project and would not rely on it (e.g. it will not work with latest versions of python) RE: Using install_requires - ChrisOfBristol - Feb-04-2019 @buran Quote:HSIDoesn't appear to have what I want, which is align-image-stack. @buran Quote:I would suggest to use HSI - it's the one referred on their page and is updated April 2018.I'm a bit confused, do you mean: Use HSI, which uses panorama, which uses a subprocess which uses CLI to call hugin? Not sure what CLI is though. @buran I think you are suggesting that: 1) use HSI 2) camocamp is defunct. 3) panorama uses a subprocess to call hugin via CLI (OS command?). 1) Having had a look at the list I can't find align-image-stack, so no good. 2) Defunct so don't use. 3) This could work as I use an OScommand from Python to run align-image-stack. How would I ensure that hugin was available? RE: Using install_requires - buran - Feb-04-2019 (Feb-04-2019, 08:40 PM)ChrisOfBristol Wrote: Doesn't appear to have what I want, which is align-image-stack.I doubt others will have it too It looks like it's just CLI tool With Hugin installed this tool should be available and you can use subprocess module to execute it from python. That's the approach that panorama is using for creating panorama images. RE: Using install_requires - buran - Feb-04-2019 (Feb-04-2019, 08:40 PM)ChrisOfBristol Wrote: think you are suggesting that: yes - all of the above (Feb-04-2019, 08:40 PM)ChrisOfBristol Wrote: 3) This could work as I use an OScommand from Python to run align-image-stack. How would I ensure that hugin was available?I also suggest that - just use subprocess.run() instead of os.system is depreciated RE: Using install_requires - ChrisOfBristol - Feb-04-2019 @buran OK, I have hugin installed on my computer. Should I expect pip3 install dist/*.tar.gzto install without error (it doesn't). or should I remove install_requires=['hugin']and ensure in some other way that hugin is available? ----------------------------------------------------------------------------------------------------------------------------------------- When it's all working I'll learn about subprocess.run and change my code. ..or isn't the PyPI format capable of ensuring that something which will be run as an OS command is installed? RE: Using install_requires - buran - Feb-05-2019 install_requires does not handle any software, just python packages required. Hugin is just some external software. You can list it as dependency, e.g. in a readme file and user should take care to install it themselves. You may use some install creator (like NSIS on Windows) that will create installer that will also download and install external dependencies. Eventually you can write a code to download and install Hugin yourself. RE: Using install_requires - ChrisOfBristol - Feb-05-2019 @buran OK, that's an important distinction. The GUI is created with Glade and GTK3+/PyGTK, does this count as a Python package or external software? |