darkdragn / party

A quick *.party downloader
84 stars 12 forks source link

Python version error #30

Open sam150122 opened 6 months ago

sam150122 commented 6 months ago

I'm getting this error

ERROR: Package 'party' requires a different Python: 3.8.10 not in '>=3.9,<4.0'

I have python 3.8.10 installed but I've tried 3.11 too Could it be an issue with python3-pip not installing the correct version?

darkdragn commented 5 months ago

I'm so sorry it took me a while to get around to this. A change from 3.8 to 3.9 included some of the typehints and automatic typing I use for the CLI.

But, things get weird if you have multiple versions of python installed and pip likes to default to the system default, so python3-pip would do that a lot too.

The usual solution to this dilemma is to use a virtual environment. Most people use a helper for that like virtualenvwrapper or poetry. But that isn't a requirement. You could always just use the built in venv if those seem too complicated or you don't have the time to familiarize yourself with them.

Here is an example of doing just that:

python3.11 -m venv venv
source venv/bin/activate

# Now the first pip on your path chain will only be for 3.11 from the venv
pip install https://github.com/darkdragn/party/releases/download/v0.7.3/party-0.7.3-py3-none-any.whl

# you can use it without issue now
#if you want to have the CLI available without having to activate the venv every time you can do the following
# this works because the execution path for python is in the CLI wrapper header

cp `which party` $HOME/.local/bin