Install pkg from Github to Python 'venv' under VSCode or Pycharm

  • Python
  • Thread starter Swamp Thing
  • Start date
  • Tags
    install
  • #1
Swamp Thing
Insights Author
919
606
I would like to install the Python package kiwiclient.py from this github repo :
https://github.com/jks-prv/kiwiclient
into a venv using an IDE like PyCharm or VSCode.

Is there a way to do this directly without cloning the repo locally?
If not, what are the steps to clone and install into a project's venv?

I am not particularly proficient in either Python, PyCharm or git so I would appreciate a detailed guide with few prerequisite skills.
Platform: Raspberry Pi OS
 
Last edited:
Technology news on Phys.org
  • #2
This would be straightforward if you do it from the terminal. Activate the venv in the terminal first. Then run:
Code:
pip install git+https://github.com/jks-prv/kiwiclient

Source.
 
  • Like
Likes Swamp Thing and Greg Bernhardt
  • #4
Greg Bernhardt said:
Use pip3 if on Python3
Doesn't it automatically use pip3 if Python 2.7 is not installed?
 
  • Like
Likes Greg Bernhardt

Related to Install pkg from Github to Python 'venv' under VSCode or Pycharm

1. How do I install a package from Github into a Python virtual environment (venv) using VSCode?

To install a package from Github into a Python virtual environment in VSCode, you can use the following command: pip install git+https://github.com/username/repository.git@branch_name

2. Can I install a package from Github into a Python virtual environment (venv) using Pycharm?

Yes, you can install a package from Github into a Python virtual environment in Pycharm. You can do this by opening the terminal in Pycharm and running the command: pip install git+https://github.com/username/repository.git@branch_name

3. How do I create a Python virtual environment (venv) in VSCode?

To create a Python virtual environment in VSCode, you can open the terminal and run the command: python -m venv venv_name. This will create a virtual environment with the specified name.

4. Can I specify a specific branch when installing a package from Github into a Python virtual environment?

Yes, you can specify a specific branch when installing a package from Github into a Python virtual environment. Simply add @branch_name at the end of the Github URL in the pip install command.

5. Is it recommended to use a Python virtual environment (venv) when installing packages from Github?

Yes, it is highly recommended to use a Python virtual environment when installing packages from Github. This helps to isolate your project dependencies and prevents conflicts with other projects or system-wide packages.

Similar threads

  • Programming and Computer Science
Replies
15
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
Back
Top