#๐ Help with ubuntu terminal (installing pip and PIL)
351 messages ยท Page 1 of 1 (latest)
@rich delta
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
What is the main issue the script is having?
I'm pretty sure pip comes default, what happens when you just type pip and hit enter?
what do you mean?
let me shwo a screnshot
nope
says: "/usr/bin/python3: No module named pip"
is this because im using this from wsl?
like i went into powershell and typed wsl
bc of some course i needed it for
hmm okay
python3 -m ensurepip --upgrade
Very strange
The other method may work
i tried every single one.
python3 get-pip.py
Did you download the get-pip.py file
You need to download it from the link on that page I sent earlier
PIL will be installed by pip
pip install pillow iirc
You now need to get the path to that file
Shift right click the file in your Explorer and hit copy as path
Then do python3 <ctrl+v to paste the path>
i cpied as path,
now i go into terminal and write...???
oh i underwstand
tried withought quotes
Yeah that's a wsl issue
so i cant do my course directly because of wsl?
ahh it worked
yep
thx
W
idk man what is your course?
Wsl has limitations related to networking
As long as you're not playing with sockets on wsl1 or network interfaces on wsl2 you're good
probably should be fine
You could always do a VM with an ubuntu install
for wasting ur time with my dumb a**
or just an Ubuntu USB
like how?
is there a linkon internet
yeah
I just knew a guy
hoh
real
but im just facing a lot of problems with coding and my stupe PC
Lmao nepotism is wild
It's not literal nepotism
Ikik
just the fact that I knew a guy who basically hired me because I knew him
but anyways
you probably have a better example for this kid
The real networking
or like answer I mean
Go to college ๐
!pypi pillow
python3 -m pip install pillow
ain't no way
What thr heck
ok it worked
cool
says i have to restart my shell thp
now try this
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init - bash)"' >> ~/.bashrc
do i just x out>
nothing happened
also is that a form of PHP
source ~/.bashrc
Nope
k
mhm
Reading package lists... Done
E: You must put some 'deb-src' URIs in your sources.list
what now
they made this difficult just bc life hates me
ive been at this for a total of 5 hrs by now
try pyenv install 3.11.5
around 6 ppl already been hlpong me
if that doesn't work lemme know
BUILD FAILED (Ubuntu 24.04 using python-build 20180424)
Inspect or clean up the working tree at /tmp/python-build.20250211201203.1082
Results logged to /tmp/python-build.20250211201203.1082.log
Last 10 log lines:
checking for pkg-config... no
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "linux"
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in /tmp/python-build.20250211201203.1082/Python-3.11.5': configure: error: no acceptable C compiler found in $PATH See config.log' for more details
um result
Command 'gcc' not found, but can be installed with:
sudo apt install gcc
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/glibc/libc-dev-bin_2.39-0ubuntu8.3_amd64.deb 404 Not Found [IP: 185.125.190.82 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/glibc/libc-devtools_2.39-0ubuntu8.3_amd64.deb 404 Not Found [IP: 185.125.190.82 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_6.8.0-51.52_amd64.deb 404 Not Found [IP: 185.125.190.82 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/glibc/libc6-dev_2.39-0ubuntu8.3_amd64.deb 404 Not Found [IP: 185.125.190.82 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
that's the ip of a datacenter in the UK
so probably not
now try the gcc install
actually
it's probably better to try to upgrade first
sudo apt upgrade -y
and then
sudo apt install gcc
it worked!!
cool
was my apt really just outdated???
maybe
ur reaction is not helping
oh ok im srry
and then all the rest follows??
yeah
Installing Python-3.11.5...
BUILD FAILED (Ubuntu 24.04 using python-build 20180424)
Inspect or clean up the working tree at /tmp/python-build.20250211201636.5229
Results logged to /tmp/python-build.20250211201636.5229.log
Last 10 log lines:
config.status: creating pyconfig.h
configure: creating Modules/Setup.local
configure: creating Makefile
configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly.
configure:
If you want a release build with all stable optimizations active (PGO, etc),
please run ./configure --enable-optimizations
/home/yoni/.pyenv/plugins/python-build/bin/python-build: line 847: make: command not found
arrr
sudo echo "deb-src http://archive.ubuntu.com/ubuntu/ jammy main" >> /etc/apt/sources.list
try that
thank goodness proffesionals r helping me
yoni@TheBigBoy:/mnt/c/Users/olgaw$ sudo echo "deb-src http://archive.ubuntu.com/ubuntu/ jammy main" >> /etc/apt/sources.list
-bash: /etc/apt/sources.list: Permission denied
yoni@TheBigBoy:/mnt/c/Users/olgaw$
fair enough
then uh ig you have to add it manually
deb-src http://archive.ubuntu.com/ubuntu/ jammy main
oohno
wdym
you can use nano if yk how with sudo nano /etc/apt/sources.list
and just adding it at the end of the file and saving the file
do sudo nano /etc/apt/sources.list
then go to the bottom of the file
and put this line in
deb-src http://archive.ubuntu.com/ubuntu/ jammy main
and to save and exit
do
control + x, then y, then enter
yes
this is arguably not the best way to do things but this is how I know how to do stuff
and i do ctrl + s
yeah its there
if the text is still there then just
exit with control x
once that's done
do
sudo apt-get update
then you can install build dependencies
with
IT WORKED
sudo apt-get build-dep python3
YOUNG BASS
sudo apt-get install pkg-config
those 2 commands
and it did say
if you want to build with all optional modules
you probably do
run this
for the first one:
Reading package lists... Done
Picking 'python3-defaults' as source package instead of 'python3'
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
builddeps:python3-defaults : Depends: python3.10:any (>= 3.10.4-1~) but it is not installable
E: Unable to correct problems, you have held broken packages.
libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \
libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \
lzma lzma-dev tk-dev uuid-dev zlib1g-dev libmpdec-dev```
that's fine ig
idk
it thinks your packages are broken
and weird
but just ignore it ig
okay
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libncurses-dev' instead of 'libncurses5-dev'
Note, selecting 'libreadline-dev' instead of 'libreadline6-dev'
E: Unable to locate package libmpdec-dev
um error?
thats all it wrote
remove the last thing from the line then
libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \
libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \
lzma lzma-dev tk-dev uuid-dev zlib1g-dev```
so that instead
lots of big message going in ma monke brain
that's fine
i think it worked
its working....
no problem
i cant rlly reward u
did it install?
IT BE WORKING
just make sure you swap to that shell before running any code
should i run the pip install?
if you want to
I like pyenv because it allows for easy management of multiple python versions
if it breaks im only taking ur advice from now on
wait i still have to do math ๐ญ
if your stuff is all good
ok thx by
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.