0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

スターレンタルサーバでVS-codeからsshして、venvでpipするところまで

Last updated at Posted at 2025-05-10

windows環境でvs-codeを利用している。スターレンタルサーバの無料枠はsshができるので試してみる。

登録した後、ssh接続を有効化する。
sshは公開鍵・秘密鍵方式で、パスワード認証は使えない。
https://note.com/htrkwn/n/n47fa18499635
https://www.star.ne.jp/support/manual/man_server_ssh.php

pip参考
https://colour-field.jp/2024-12-22/

レンタルサーバでユーザーの権限が制限されており、pipがetcにアクセスする際にエラーがでる。

仮想環境の構築

まず pip を仮想環境内にインストールせずに venv を作成し、その後手動で pip を導入します。pythonのバージョンが古い(3.6)なので、それに合わせる必要もある。

python3 -m venv test_venv --without-pip

source test_venv/bin/activate

curl https://bootstrap.pypa.io/pip/3.6/get-pip.py -o get-pip36.py
python get-pip36.py

# 以下の出力を得た。
(test_venv) [ssxxx@svxxxxx ~]$ pip list
Package    Version
---------- -------
pip        21.3.1
setuptools 59.6.0
wheel      0.37.1
(test_venv) [ssxxx@svxxxxx ~]$


0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?