#๐Ÿ”’ Pip install lap error, can't install lap when trying to install ultralytics

277 messages ยท Page 1 of 1 (latest)

balmy current
#

error message:

ember shadowBOT
#

@balmy current

Python help channel opened

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.

scenic quiver
#

!paste

ember shadowBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

balmy current
#

can you see the txt file i send or should i sent it again

scenic quiver
balmy current
#

please see here

scenic quiver
#

ImportError: lap requires numpy, please "pip install numpy".
did you try this?

balmy current
#

yeah requirement already satisfied

scenic quiver
#

what OS and python version are you?

balmy current
#

windows 11 and python3.12.3

#

installed dependencies in virtual env btw

scenic quiver
#

@balmy current look like the last update to lap was two years ago

Running lap requires:

Python (2.7, 3.7, 3.8, 3.9)
NumPy (>=1.10.1)
I guess you should try doing it with python 3.9

#

you can install multiple python versions and make a virtual environment for different versions with py -3.9 -m venv venv

balmy current
#

would work?

scenic quiver
# balmy current

see if you can find a 3.9 version that has a windows installer.

#

there's one here

balmy current
#

thanks man. let me runthrough thi quickly and revert

#

PS C:\Users\iveda\Desktop\Minor Project\may1> ..myenv\Scripts\Activate
..myenv\Scripts\Activate : The term '..myenv\Scripts\Activate' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • ..myenv\Scripts\Activate
  •   + CategoryInfo          : ObjectNotFound: (.\.myenv\Scripts\Activate:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

PS C:\Users\iveda\Desktop\Minor Project\may1>

#

how do i fix this?

#

created env, but can't enter into it

scenic quiver
#

why the ..?

balmy current
#

"myenv\Scripts\Activate"
this also dont' work

regal falcon
balmy current
#

PS C:\Users\iveda\Desktop\Minor Project\may1> ./myenv/Scripts/Activate.ps1
./myenv/Scripts/Activate.ps1 : The term './myenv/Scripts/Activate.ps1' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • ./myenv/Scripts/Activate.ps1
  •   + CategoryInfo          : ObjectNotFound: (./myenv/Scripts/Activate.ps1:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
#

doesn't work either

regal falcon
#

can you do one thing

#

show me your working directory

#

like your file structure

balmy current
regal falcon
balmy current
#

then

regal falcon
#

then activate.ps1

#

drag it to the terminal

#

and press enter

#

drag the Activate.ps1 to terminal

balmy current
regal falcon
#

wait what

#

your permissions are not letting you do so

balmy current
#

i am administrator

regal falcon
#

possible

#

can you do one thing

balmy current
#

yes

regal falcon
#

open a new window

balmy current
#

in code?

regal falcon
#

yes

#

vscode

balmy current
#

then

regal falcon
#

send the screen shot of your screen

#

whole screen

balmy current
#

in which folder or any random folder?

regal falcon
#

make a new one

balmy current
regal falcon
#

you see that 3.12 bit in the corner

#

click on that

balmy current
#

yes

regal falcon
#

it'd open a pallete

#

make a venv thru it

balmy current
#

venv or conda?

regal falcon
#

venv ofc

balmy current
#

okay venv then

#

3.9?

regal falcon
#

choose the pyrhon version and create it

#

what does your code require?

#

3.9 or 3.12?

balmy current
#

yes i need 3.9 so wiht 3.9

#

done

regal falcon
#

wait till it creates

balmy current
#

created

regal falcon
#

and start it though the button on top right

#

run button

#

screenshot

balmy current
#

*aware

regal falcon
#

ikr its empty just do

balmy current
regal falcon
#

in that terminal

#

type

./.venv/Scripts/Activate.ps1
balmy current
#

i know a command to change execution policy

regal falcon
#

do it

balmy current
#

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

regal falcon
#

ah yes

#

this should do

balmy current
#

done

#

worked

regal falcon
#

great

#

now migrate your code to this new one

balmy current
#

what was error btw, if i can know?

regal falcon
#

there was no error on your side it was just terminal and its policies

balmy current
#

oh okay

regal falcon
#

one error was

balmy current
#

create with vscode itself, noted!

regal falcon
#

you told me that your venve is myvenv which was wrong

#

it was venv

balmy current
#

okay this is solved

regal falcon
#

yes

balmy current
#

but my main error is not solved

#

pip install lap

regal falcon
#

whats now?

#

show me the error log

balmy current
regal falcon
balmy current
#

bro told me to install 3.9

#

and i don't think we have any old installers

regal falcon
balmy current
#

okay

#

need to install git first

#

i reinstalled windows a week ago

regal falcon
#

btw

#

you can just do pip install numpy

#

i just saw your error

balmy current
#

did

regal falcon
#

okay then go for git

balmy current
#

yeah

regal falcon
#

wait

#

no

#

bro

#

tf

balmy current
#

what

regal falcon
#

@balmy current that package is closed

balmy current
#

so now?

regal falcon
balmy current
#

pip install lapx

regal falcon
#

yes

#

this works on 3.12

#

so shift

balmy current
#

if they can't maintain why they startes

#

damn bruh

#

worked

regal falcon
#

well you cant force someone to maintain their open source

#

๐Ÿ˜ƒ

balmy current
#

yeah true anyways we can't

regal falcon
#

yep

balmy current
#

error

regal falcon
#

is it solved completely now?

#

what is it

#

pl show

balmy current
#

sorry if it hurts your eyes

regal falcon
#

huh

#

you dont have visual tools?

balmy current
#

no

#

reinstalled windows

regal falcon
#

onstall it

#

they've given a link

#

as well

#

at the end of error see

#

to the Microsoft

balmy current
#

okay just kept it to download

#

what should i download in individual components

regal falcon
#

general python dev and cpp compiler

balmy current
#

desktop development with c++?

regal falcon
#

python

#

have a read

balmy current
#

can i pip install -u setuptools?

regal falcon
# balmy current can i pip install -u setuptools?

Are you trying to install your Python library dependencies using the pip command and you always encounter this error: โ€œerror: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/โ€?

In this video, I will share how to fix the issue. I am trying to in...

โ–ถ Play video
balmy current
#

okay done

#

downloading

balmy current
#

not solved wait

#

@regal falcon

regal falcon
#

wait

balmy current
#

what's that

regal falcon
balmy current
#

set the path

#

error persists

regal falcon
#

whats the error?

balmy current
balmy current
golden shale
#

Messing around with gcc is a red hering

balmy current
#

so what should i do in this case?

regal falcon
#

either get a wheel

golden shale
#

pip should download the wheel for you

regal falcon
#

pre built

balmy current
#

pip install wheel?

golden shale
#

lapx required numpy to be installed first.

regal falcon
#

nuh

golden shale
#

pip install numpy

regal falcon
balmy current
golden shale
#

What other packages need to be installed?

regal falcon
#

bruh

balmy current
#

whole ultralytics

regal falcon
#

you need to fix this error

golden shale
#

oh, pytorch

regal falcon
balmy current
#

๐Ÿ˜‚ can't run sudo apt install g++ here

regal falcon
#

learn to solve

balmy current
#

says to install cygwin applciaiton

regal falcon
#

yes

#

thats g++

balmy current
#

doing

balmy current
regal falcon
#

ik

balmy current
#

cygwin in progress or should i do this

regal falcon
#

no let it install

balmy current
#

okay

golden shale
#

Oh, no wonder the install is taking so long for me. nvidia-ccl-cu12's wheel is 188MB

regal falcon
balmy current
#

i don't understand this interface

#

why it is written skip? for gcc

golden shale
#

Again, this is a red hering.

balmy current
#

should i go with wheel, you're sayinh?

golden shale
#

which package dependency is wanting gcc?

balmy current
#

ultralytics

golden shale
#

no, which dependency?

regal falcon
balmy current
#

scipy

regal falcon
#

i k there is a thing

#

which had pre built wheels

#

but i am not able to find it

#

ages since I've used it

golden shale
#

And what's the output of pip debug?

regal falcon
#

absence of compiler

#

scipy needs to build a wheel on local machine i hope you know that

balmy current
#

should i run pip debug

golden shale
#

yes

balmy current
golden shale
#

You have a 32 bit version of python installed.

#

Is your OS 64 or 32 bit?

balmy current
#

64

#

windows

golden shale
#

Then you should install the 64 bit version of python

balmy current
golden shale
#

telling

balmy current
#

now how i do thaT?

golden shale
#

very few packages ship 32 bit binaries anymore

#

!download

balmy current
#

i mean uninstalled the current versions

#

3.9 and 3.12

golden shale
#

use the system app manager

balmy current
#

okay

#

but i have 3.12 64 but

golden shale
#

you were using 3.9 32 bit

#

Run py -0

balmy current
#

maybe i created 32 bit 3.9 verison for virtual env

#

that causing the errors

golden shale
#

it creates whatever version you have installed

balmy current
#

i specifically chose 3.9

golden shale
#

and you installed the 32 bit version

balmy current
#

because we were in impression that lap supports 3.9 and ny mistake i installed 32bit

golden shale
#

yes

#

I would suggest installing python via winget

#

winget install python.python.3.9

balmy current
#

no

#

we don't need 39anymore

#

3.9

golden shale
#

3.12 then

balmy current
#

because lap was shifted to lapx

#

yeash

#

thank you guys @golden shale @regal falcon problem solved

golden shale
#

Like I said. Red herring

ember shadowBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, 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.