728x90
반응형

pip install 기능을 쓰다보면, 아래와 같은 에러가 종종 발생한다.

 

[에러]


SSL 때문에 발생하는 오류로 여러 해결책이 있지만, 임시로 빠르게 설치하려면

python -m pip install --upgrade pip --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org

 

이런 식으로​ --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org

옵션을 붙여주면 된다.

 

[에러 해결]


 

-끝-

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

728x90
반응형
728x90
반응형

Error: Could not locate a Flask application. Use the 'flask --app' option, 'FLASK_APP' environment variable, or a 'wsgi.py' or 'app.py' file in the current directory.

flask 개발 초기에 종종 발생하는 에러


아마 사용하는 환경이 맥북이고, set FLASK_APP=testtest 명령어로 설정했을 가능성이 높다.

exprot FLASK_APP=testtest로 변경하고, flask run을 해보자

 

아래 그림처럼 flask 서버가 실행되는 것을 볼 수 있다.

 

-끝-

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

728x90
반응형
728x90
반응형

개발 강의 따라 mysql 설치하다보면 developer default 옵션이 없는 경우가 있다.

 

해결방법


Custom으로 맞춰주지말고, 쿨하게 Full로 설치하자

패스워드 등록, 계정도 하나 생성해주고

 

설치 끝

 

728x90
반응형
728x90
반응형

IntelliJ IDEA Ultimate(유료)

윈도우용 : https://www.jetbrains.com/ko-kr/idea/download/?section=windows 

맥용 : https://www.jetbrains.com/ko-kr/idea/download/?section=mac 

 

IntelliJ IDEA Community Edition(무료)

커뮤니티 버전은 위 링크 클릭 후 스크롤 아래로 내리면 나옴

 

전체버전 모음 : https://www.jetbrains.com/ko-kr/idea/download/other.html

 

기타 버전 - IntelliJ IDEA

 

www.jetbrains.com


설치 팁 - 아래 옵션 주고(취향), 리붓은 준비되면 합시다.

 

728x90
반응형
728x90
반응형

요약
1. OpenJDK 홈페이지 접속, 다운로드
2. OpenJDK 파일 이동, 환경변수 설정

 

1. OpenJDK 다운로드


귀찮으면 아래 클릭

(자바8): https://jdk.java.net/java-se-ri/8

(자바11): https://jdk.java.net/java-se-ri/11

(자바17): https://jdk.java.net/java-se-ri/17


(정석) 다운로드 사이트 접속 후 원하는 버전 다운로드

https://jdk.java.net/11

 

JDK 11 Releases

JDK 11 Releases The JDK 11 Early Access Program has concluded. Please visit Java SE Downloads for production ready builds. Older releases, which do not include the most up to date security vulnerability fixes and are no longer recommended for use in produc

jdk.java.net

좌측에서 원하는 버전 선택 클릭, 따운로드

 

2. OpenJDK 파일 이동 및 환경 변수 설정


다운받은 파일 압축 풀거나, 더블클릭해서 jdk-11 파일을 C드라이브로 옮겨 줍니다


윈도우키 누르고, 환경 변수 검색 > "시스템 환경 변수 편집" 클릭


 

환경 변수 > Path 클릭 및 편집 클릭


새로 만들기 클릭 후 jdk-11\bin 경로 입력, 이후 전부 확인

 

cmd 창을 켜서 java -version을 입력하면 아까 설치한 자바 JDK의 버전이 출력됩니다.

\

 

-끝-

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

728x90
반응형
728x90
반응형

코틀린 공부를 좀 하고 싶어서, 블로그를 보고 좀 공부를 했다.
근데 블로그 글대로 따라하면

activity_main.xml 가 없더라.

확인


일반적인 강의 내용대로, Empty Activity 를 선택하고, 적당히 만들어보면

 

없다.

activity_main.xml 를 수정해서 화면을 꾸미고 싶은데

새로 만들어야되는지 아니면 설정을 잘못해서 없는건지 혼동이 온다.

 

무튼 이유는 Giraffe 버전에는 Empty Activity 로 만들면 activity_main.xml 파일이 자동으로 생성되지 않는다.

아래 그림과 같이 Empty Views Activity 를 선택해서 만들어야된다.

오늘의 교훈

강의/블로그 보고 뭘 할땐, 옛날 자료 보지말자, 옛날 자료 보고 해야되면 해당 환경에 맞추자

 

 


참고 자료 : https://velog.io/@jejun_/%EC%95%88%EB%93%9C%EB%A1%9C%EC%9D%B4%EB%93%9C-%EC%8A%A4%ED%8A%9C%EB%94%94%EC%98%A4-%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8%EC%97%90-%EC%99%9C-Layout%ED%8F%B4%EB%8D%94-activitymain.xml%EC%9D%B4-%EC%97%86%EC%9D%84%EA%B9%8C

https://developer.android.com/codelabs/kotlin-android-training-get-started#3

 

-끝-

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

728x90
반응형
728x90
반응형

맥북 환경에 디비 서버 구축하고, 그 데이터를 테스트 서버(VM)에서 땡겨올 예정

#homebrew로 설치
~ % brew install mariadb
~ % brew services start mariadb

#homebrew로 실행
~ % brew services start mariadb
==> Successfully started `mariadb` (label: homebrew.mxcl.mariadb)

#실행 서비스 조회
~ % brew services start list
mariadb started s ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist

 

외부 접속 설정


 

# 계정 설정 시 구분 ###################################

내부 접속
CREATE USER 'test'@'localhost' identified by '1234';

외부 접속(모든 IP)
CREATE USER 'test'@'%' identified by '1234';

외부 접속(특정 IP, 특정 대역)
CREATE USER 'test'@'123.123.%' identified by '1234';

################################################

> show databases;                                      // 디비 현황
> CREATE DATABASE songtestdb;           // songtestdb 디비 생성
> USE songtestdb                                       // songtestdb 사용

[계정생성]
MariaDB [songtestdb]> CREATE USER 'song'@'%' identified by '1234';

[이거로도 계정생성]
MariaDB [songtestdb]> GRANT ALL PRIVILEGES ON *.* TO 'song'@'%' IDENTIFIED BY '1234';
MariaDB [songtestdb]> FLUSH PRIVILEGES;
MariaDB [songtestdb]> select user, host from mysql.user;

[계정삭제]
MariaDB [songtestdb]>DELETE FROM mysql.user WHERE host='%' AND user='song';
FLUSH PRIVILEGES;

 

 

 

제목2


ㅁㅁ

ㅁㅁ

ㅁㅁ

 

 

-끝-

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

728x90
반응형
728x90
반응형

requests 모듈 설치 하려는데 위 에러 가 뜸.

connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED]

- 원인 : 패키지 다운로드 하는 사이트의 ssl 신뢰 X
- 해결: 아래와 같이 사용

pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org {패키지이름}

 

 

1. 해결 케이스


pip install requests 에러남 (아래 처럼 에러메시지 뜸)

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SS                L: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)'))': /simple/requests/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SS                L: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)'))': /simple/requests/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SS                L: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)'))': /simple/requests/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SS                L: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)'))': /simple/requests/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)'))': /simple/requests/
Could not fetch URL https://pypi.org/simple/requests/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/requests/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)'))) - skipping
ERROR: Could not find a version that satisfies the requirement requests (from versions: none)
ERROR: No matching distribution found for requests
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)'))) - skipping
WARNING: There was an error checking the latest version of pip.

 

아래처럼 명령어 침

pip install {패키지명} --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org

 

[예시]

pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org requests

 

설치 완료

 

-끝-

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

728x90
반응형
728x90
반응형

(인용3)내용을 요약합니다.
1
2
3

문자열 길이 구하기


'CNqoDKzYiJL9RaE8yMnPgh2XzzF0NDrUhgrcLwg78xs1w5pJiypEdFX/'.length

 

출력 : 56

 

제목2


ㅁㅁ

ㅁㅁ

ㅁㅁ

 

 

-끝-

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

728x90
반응형

'프로그래밍 > JavaScript' 카테고리의 다른 글

Arrow function(js 화살표함수)  (0) 2022.04.11
728x90
반응형

조사하는김에 정리

sep='값' : print 출력값 사이 연결
end='값' : print 출력값 이후 출력
값.format() : 특정 값 삽입
escape : \n(개행), \t(탭) 등

 

sep, end, format


소스 복사해서 출력해보면 느낌이 올거다.

#sep
print('a', 'b', 'c', sep='$$$$$')

#출력값
#a$$$$$b$$$$$c


#end
print('a', 'b', 'c', end='\n$$$$$\n')

#출력값
#a b c
#$$$$$


#format
print('{} 앤드 {}'.format('coffee', 'donut'))
#출력값
#coffee 앤드 donut

 

escape 종류


print 구문에서 특수문자를 표현하려면 \(백슬래시)를 붙여줘야된다.


\n : 개행
\t : 탭(
\\ : '\' 
\' : 쿼터
\" : 더블쿼터

 

**Raw string과 F-string 활용


Raw String은 print('내용') 구문 내 특문을 전부 무시해준다.(매우 중요)


특문이 많은 문장을 복붙하거나, 데이터 분석 시 아래와 같은 상황에서는
각 \n 개행마다 텍스트 출력위해 \\n으로 바꿔주기 귀찮다.
ex1) print('1111\\n222\\n1111\\n222\\n1111\\n222\\n1111\\n222\\n1111\\n222\\n')

고로 r을 붙여서 raw string으로 쉽게쓰자
ex2) print(r'1111\n222\n1111\n222\n1111\n222\n1111\n222\n1111\n222\n1111\n222\n')

F-String은 format 기법을 효율적 사용 방안이다. (3.6버전 이상 지원한다.)

txt = 'aaa'
output = f'Its {txt}'
print(output)
# Its aaa

a = 1
b = 2
output = f'합 : {a+b}'
print(output)
# 합 : 3

#참고 https://brownbears.tistory.com/421

그렇다.

 

-끝-

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

728x90
반응형

+ Recent posts