derkalle4 / python3-idotmatrix-client

reverse engineered python3 client to control all your 16x16 or 32x32 pixel displays (experimental)
GNU General Public License v3.0
193 stars 40 forks source link

"No module named pip3" #35

Open marto68 opened 5 months ago

marto68 commented 5 months ago

I tried to install the client on a raspberry pi 4.

After running the "./create_venv.sh" command I got an error saying there was no module named pip3 in the venv folder. Which there is.

I have updated python to 3.12

Running pip - - version and pip3 - - version returns "pip24. 0 from usr/local/lib/python3.12/site-packages/pip (python 3.12)" for both commands.

I'm really not sure what I'm doing wrong. Would anyone have any ideas?

schorsch3000 commented 5 months ago

What OS and version are you running?

Most likely your are running Debian / Rasbian and are just missing the python3-pip-package.

derkalle4 commented 5 months ago

Hi @marto68

like @schorsch3000 has already explained you'll need to install the pip package. The ./create_env.sh does use the system packages. Only ./run_in_venv.sh does use the virtual environment currently :)

Kind Regards, Kalle

marto68 commented 5 months ago

Thanks for getting back so quickly.

I just checked and have the latest python3-pip package.

I'm running raspbian bookworm with desktop on a raspberry pi 4, 4g Still having same problem

marto68 commented 4 months ago

Unfortunately, I still have the same problem.

Do you recommend a walk through to get raspbian ready for the client install? ie: install and update to python 3 and pip3 correctly, and also venv virtual environment?

Obviously the guides I found and using are wrong or not current.

I would really like to get this client going, so any help would be very much appreciated.

Thanks

Duberry commented 4 months ago

There are some assumptions in the create_venv.sh file that appear to be incompatable with Ubuntu at least.

if command -v python3 &> /dev/null
then
    PYTHON_CMD=python3
    PIP_CMD=pip3
else
    PYTHON_CMD=python
    PIP_CMD=pip
#fi

At least for Ubuntu 22.04 when using modules from the default repositories, this works:

  PYTHON_CMD=python3
  PIP_CMD=pip
marto68 commented 4 months ago

Thanks Duberry! That fix worked on Raspbian Bookworm as well.

schorsch3000 commented 4 months ago

that should be fixed with #38 would you be willing to check that its works out of the box for you @marto68 ?

marto68 commented 4 months ago

Not a problem @schorsch3000 I will get back soon.

marto68 commented 4 months ago

Hi @schorsch3000,

Unfortunately it didn't work for me.

After deleting the venv, I overwrote 2 files and copied 1 from #38 (I hope that is what you wanted me to do)

I ran - ./create_venv.sh
and received - venv/bin/python3: No module named pip3

Cheers

Update- sorry, I realized it was already committed so I cloned the repo again and did a fresh install as you suggested.

Still cant find Pip3 - /venv/bin/python3: No module named pip3

aviwad commented 3 months ago

Same error on macOS with python3 installed from brew as well as the python3 from xcode-select

aviwad commented 3 months ago

Solution: replace pip3 in line 22 of find_cmds.sh with pip

derkalle4 commented 3 months ago

He, that should be worth a pull request. Good finding :)

schorsch3000 commented 3 months ago

Solution: replace pip3 in line 22 of find_cmds.sh with pip

He, that should be worth a pull request. Good finding :)

That would fix it only for situations where a pip3 command is there and executeable but its not working and there is a pip executeable. It also would break things for working setups with a pip3 command.

In the case where is a pip3 command but that should or can not be used one should either just fix the setup or use the PIP_CMD env var :-)

sh4dowb commented 2 months ago

I think changing pip3 to pip should not break anything. it's used as the python module like this: python3 -m pip3 install ./ there's no pip3 module, it's pip module. pip3 is the executable.

schorsch3000 commented 2 months ago

I think changing pip3 to pip should not break anything. it's used as the python module like this: python3 -m pip3 install ./ there's no pip3 module, it's pip module. pip3 is the executable.

you are correct, its called by module name, not as a comment. i'll rework that!