#문제.

https://softeer.ai/practice/7628

 

Softeer - 현대자동차그룹 SW인재확보플랫폼

 

softeer.ai

 

#정답.

import sys

'''
6
2 4 6 9 12 18
'''
chance = int(sys.stdin.readline())
num_list = list(map(int, sys.stdin.readline().split()))
max_num = max(num_list)
if max_num > 100:
    max_num = 100
top_max_value = 0
for i in range(2, 101):
    cnt = 0
    for n in num_list:
        if n % i == 0:
            cnt += 1
    if top_max_value < cnt:
        top_max_value = cnt
print(top_max_value)

1. Virtualenv 설치

pip install virtualenv

 

2. 환경 생성

virtualenv capture --python=python3.10

PC에 python3.10은 설치되어있어야함.

가상환경명은 capture로 지정했음. (수정 가능)

 

3. 경로 이동

cd capture
cd Scripts
activate

 

입력하면 활성화 된 상태로 나옴.

안녕하세요.

 

윈도우, 우분투 환경에 똑같이 프로그램 배포가 가능하게 하기 위해서 

프로그램을 말아야하는데, 우분투 환경에서 말아야해서

코드를 그대로 가져가려면 다시 환경을 구축해야하는 문제가 있죠!

그래서 윈도우에서 사용하던 가상 환경을 그대로 가져가서 우분우에 설치해보겠습니다.

 

1. 윈도우 가상환경 활성화 시키기

cd (환경이름)/bin/scripts/activate

 

2. 라이브러리 txt 파일로 뽑아내기

pip freeze > requirements.txt

 

3. 우분투에서 virtualenv 가상환경 생성하기

virtualenv DINO~

 

4. 가상환경 내 라이브러리 설치하기

pip install -r requirements.txt

 

 

하면 구축 완료 됩니다.

 

 

안녕하세요

브리아나AI입니다.

 

pyinstaller 마는 과정에서 다음과 같은 에러를 마주해

https://stackoverflow.com/questions/78375284/torch-error-nameerror-name-name-is-not-defined

 

torch error : NameError name 'name' is not defined

I'm currently attempting to create an executable using PyInstaller, but I've encountered an error : NameError: name 'name' is not defined caused by the line of code below. model = lp.

stackoverflow.com

 

해당 링크의 댓글을 참조해 수정했습니다.

 

1. 가상환경 접속 후 파일 찾기

 

2. 코드 수정하기

 

이렇게 하니 해결 완료되었습니다.

 

스펠링을 정확하게 놓치지 마시고 변경하세요!!

+ Recent posts