교환학생 (University of Mississippi)/학부연구생

The errors I encountered while cloning the GitHub code for the paper

케이비이 2024. 10. 8. 17:31

I tried to git clone DA-LLPose repository and I encountered a lot of errors. I’ll show how I solved them.

 

GitHub - ayh015-dev/DA-LLPose

Contribute to ayh015-dev/DA-LLPose development by creating an account on GitHub.

github.com

 

1. Git SSH Issue

⛔️ Error

When I tried to clone a repository on the Ubuntu system, I ecoutered the warning “Permission denied”.

kabeenkim@adlerNorth09:~/Research/DALLPose$ git clone git@github.com:ayh015-dev/DA-LLPose.git
Cloning into 'DA-LLPose'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

🔍 Cause

The SSH Key wasn’t registerd on the ubuntu and github. If you are using git on a new computer, you might face this error as well.

✅ Solution

1. generate an SSH Key:

ssh-keygen //create ssh on you computer

Once generated, you will seem a message like: “Your indentification has been saved in /home/kabeenkim/.ssh/id_ed25519”

 

2. Check the public key:

cat ~/.ssh/id_ed25519.pub

 

3. Register the SSH Key on GitHub:

Copy the result and add it as a new SSH Key in GitHub settings under the “Key” field.


2. error: externally-managed-environment

⛔️ Error

I got the error message “error: externally-managed-environment”.

✅ Solution

1. Install a virtual environment

sudo apt install python3-venv

 

2. Create a new virtual environment

python3 -m venv {virtual_environment_name}

 

3. Activate the virtual environment

source {virtual_environment_name}/bin/activate

 

4. Deactivate the virtual environment

deactivate

 


3. ERROR: Could not find a version that satisfies the requirement torch==2.0.1

⛔️ Error

While running pip install -r requirements.txt , I got the error message “ERROR: Could not find a version that satisfies the requirement torch==2.0.1 “.

ERROR: Could not find a version that satisfies the requirement torch==2.0.1 (from versions: 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.4.0, 2.4.1)
ERROR: No matching distribution found for torch==2.0.1

🔍 Cause

Torch 2.0.1 version is compatible with Python 3.10 or Python 3.11, but Ubuntu was using python3.12. So I downgraded Python from version 3.12 to 3.10 and ran the command again.

✅ Solution

1. Downgrade Python version on Ubuntu 24.04

sudo apt update && sudo apt upgrade
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt update
sudo apt install python3.10

 

2. Create a new virtual environment with Python 3.10

sudo apt install python3.10-venv
python3.10 -m venv {name}
source {name}/bin/activate


4. AttributeError: module 'numpy' has no attribute 'float'.

⛔️ Error

When I tried to run the test file, I gor the error message “AttributeError: module 'numpy' has no attribute 'float'”.

np.float was a deprecated alias for the builtin float. To avoid this error in existing code, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here.

🔍 Cause

The new vewsion of Numpy no longer provide the float command.

✅ Solution

1. Find cocoeval.py files

2. Change np.float to np.float64


0. Reference

 

[Ubuntu] Git ssh 등록 에러 Permission denied (publickey)

원래 하던 PC가 아닌 신규 PC에서 깃에 푸시할 경우 아래와 같은 에러를 볼 수 있습니다. git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. 이때는 간단한 ssh 등록으로 해당 pc

seung.tistory.com

 

[가상환경] 우분투(Ubuntu) - 가상환경 만들기

가상 환경을 사용하면 좋습니다. 가상 환경이 필요한 간단한 이유는 개발 버전으로 인해, 문제가 발생하기 때문에 별도로 관리하여야 합니다. 혼자 하는 경우는 상관없겠지만 협업을 하면 같은

ssilook.tistory.com

 

How to Install Python 3.10 on Ubuntu 24.04, 22.04 or 20.04 - LinuxCapable

The following guide will teach you how to install Python 3.10 on Ubuntu 24.04, 22.04 or 20.04 with complete steps and screenshots.

linuxcapable.com

 

 

Finally...!