Closed bonelifer closed 2 years ago
It is possible but it is a bit of a pain. Assuming you have Python 3.6+ and pip installed, you could try:
git clone https://github.com/paulgalow/albumart-dl.git
cd albumart-dl
sed 's/3.7/3/' -i Pipfile
pip install pipenv
pipenv install
This will edit the Pipfile and then install pipenv. pipenv will then download and install dependencies.
The downside is that you have to prepend pipenv run
anytime you want to run albumart-dl, e.g.:
pipenv run albumart-dl "Brad Mehldau After Bach"
Did a quick test using the python:3-bullseye Docker image.
Get this error:
`william@william:/media/william/DataOrig/CODE$ gc https://github.com/paulgalow/albumart-dl.git Cloning into 'albumart-dl'... remote: Enumerating objects: 95, done. remote: Total 95 (delta 0), reused 0 (delta 0), pack-reused 95 Receiving objects: 100% (95/95), 30.25 KiB | 524.00 KiB/s, done. Resolving deltas: 100% (50/50), done. william@william:/media/william/DataOrig/CODE$ cd albumart-dl/ william@william:/media/william/DataOrig/CODE/albumart-dl$ sed 's/3.7/3/' -i Pipfile william@william:/media/william/DataOrig/CODE/albumart-dl$ pip install pipenv Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: pipenv in /home/william/.local/lib/python3.8/site-packages (2022.1.8) Requirement already satisfied: virtualenv-clone>=0.2.5 in /home/william/.local/lib/python3.8/site-packages (from pipenv) (0.5.7) Requirement already satisfied: pip>=18.0 in /home/william/.local/lib/python3.8/site-packages (from pipenv) (22.1) Requirement already satisfied: certifi in /home/william/.local/lib/python3.8/site-packages (from pipenv) (2021.10.8) Requirement already satisfied: setuptools>=36.2.1 in /home/william/.local/lib/python3.8/site-packages (from pipenv) (60.10.0) Requirement already satisfied: virtualenv in /home/william/.local/lib/python3.8/site-packages (from pipenv) (20.13.4) Requirement already satisfied: distlib<1,>=0.3.1 in /home/william/.local/lib/python3.8/site-packages (from virtualenv->pipenv) (0.3.4) Requirement already satisfied: platformdirs<3,>=2 in /home/william/.local/lib/python3.8/site-packages (from virtualenv->pipenv) (2.5.1) Requirement already satisfied: filelock<4,>=3.2 in /home/william/.local/lib/python3.8/site-packages (from virtualenv->pipenv) (3.6.0) Requirement already satisfied: six<2,>=1.9.0 in /home/william/.local/lib/python3.8/site-packages (from virtualenv->pipenv) (1.16.0) william@william:/media/william/DataOrig/CODE/albumart-dl$ pipenv run albumart-dl "Zac Brown Band Chicken Fried" /home/william/.local/lib/python3.8/site-packages/pkg_resources/init.py:122: PkgResourcesDeprecationWarning: 0.1.36ubuntu1 is an invalid version and will not be supported in a future release warnings.warn( /home/william/.local/lib/python3.8/site-packages/pkg_resources/init.py:122: PkgResourcesDeprecationWarning: 1.13.1-unknown is an invalid version and will not be supported in a future release warnings.warn( /home/william/.local/lib/python3.8/site-packages/pkg_resources/init.py:122: PkgResourcesDeprecationWarning: 2.1.2pop0-1587756471-20.04-cd2988e is an invalid version and will not be supported in a future release warnings.warn( /home/william/.local/lib/python3.8/site-packages/pkg_resources/init.py:122: PkgResourcesDeprecationWarning: 0.23ubuntu1 is an invalid version and will not be supported in a future release warnings.warn( Creating a virtualenv for this project... Pipfile: /media/william/DataOrig/CODE/albumart-dl/Pipfile Using /usr/bin/python3.9 (3.9.13) to create virtualenv... ⠇ Creating virtual environment...created virtual environment CPython3.9.13.final.0-64 in 1189ms creator CPython3Posix(dest=/home/william/.local/share/virtualenvs/albumart-dl-GmhST6UX, clear=False, no_vcs_ignore=False, global=False) seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/william/.local/share/virtualenv) added seed packages: pip==22.0.4, setuptools==60.10.0, wheel==0.37.1 activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
✔ Successfully created virtual environment! Virtualenv location: /home/william/.local/share/virtualenvs/albumart-dl-GmhST6UX Error: the command albumart-dl could not be found within PATH or Pipfile's [scripts]. william@william:/media/william/DataOrig/CODE/albumart-dl$`
:(
Not sure why this is but it looks like the setup actually succeeded. The main error seems to suggest, that albumart-dl could not be found. What happens if you run pipenv run albumart-dl "Brad Mehldau After Bach"
from the directory where you have installed/cloned the app?
Looking at your output again, it seems pipenv install
was omitted before you ran pipenv run albumart-dl "Zac Brown Band Chicken Fried"
. At least I can't find its invocation.
NVM. That was it. I thought I had done that.
I still get this during the run, but it works otherwise: '/home/william/.local/lib/python3.8/site-packages/pkg_resources/init.py:122: PkgResourcesDeprecationWarning: 0.1.36ubuntu1 is an invalid version and will not be supported in a future release warnings.warn( /home/william/.local/lib/python3.8/site-packages/pkg_resources/init.py:122: PkgResourcesDeprecationWarning: 1.13.1-unknown is an invalid version and will not be supported in a future release warnings.warn( /home/william/.local/lib/python3.8/site-packages/pkg_resources/init.py:122: PkgResourcesDeprecationWarning: 2.1.2pop0-1587756471-20.04-cd2988e is an invalid version and will not be supported in a future release warnings.warn( /home/william/.local/lib/python3.8/site-packages/pkg_resources/init.py:122: PkgResourcesDeprecationWarning: 0.23ubuntu1 is an invalid version and will not be supported in a future release warnings.warn( '
Great. The remaining errors seem to be related to your local version of Python or some of its installed packages. At least I did not encounter those on a freshly installed version of a more recent Python release.
For those that see this in the future. Add this alias to your ~/.bash_aliases
:
alias albumart-dl="cd /path/tothefolder/albumart-dl/ && pipenv run albumart-dl"
Now run: source ~/.bash_aliases
then just run as usual:
albumart-dl "Singer Song Title"
This would make a good Github Wiki entry.
Is there a set of commands I can run to install this without me using Linux Homebrew?