How to install Python package from GitHub?
You need to use the proper git URL:
pip install git+https://github.com/jkbr/httpie.git#egg=httpie
Also see the VCS Support section of the pip documentation.
Don’t forget to include the egg=<projectname>
part to explicitly name the project; this way pip can track metadata for it without having to have run the setup.py script.
How to install Python package from GitHub that doesn't have setup.py in it
Looks like the developer didn't bother to package it properly. It it was me using it, I would fork it on GH, add the setup.py and use the fork. Maybe a good exercise for you?
Meanwhile, to just get it to work, in your project "root":
git clone https://github.com/LBank-exchange/lbank-api-sdk-v2.git
ln -s lbank-api-sdk-v2/python-sdk-api/LBank ./LBank
Then in your code just import LBank
. This will leave the cloned repo untouched (so you can git pull to update it later) and just link the module directory to the root. Alternatively you can just include the api directory in sys.path
for imports to work.
How to install local python packages when building jobs under Github Actions?
The "package under test", potion
in your case, should not be part of the requirements.txt. Instead, simply add your line
pip install -e .
after the line with pip install -r requirements.txt
in it. That installs the already checked out package in development mode and makes it available locally for an import
.
Alternatively, you could put that line at the latest needed point, i.e. right before you run pytest
.
Installing Python Package from Github Using PIP
The -e flag tells pip to install it as "editable", i.e. keep the source around. Drop the -e flag and it should do about what you expect.
sudo pip install git+git://github.com/myuser/myproject.git#egg=myproject
If that doesn't work try using https instead of git.
sudo pip install git+https://github.com/myuser/myproject.git#egg=myproject
Related Topics
Shuffle an Array with Python, Randomize Array Item Order with Python
Formatting Long Numbers as Strings in Python
Rename Specific Column(S) in Pandas
How to Write Binary Data to Stdout in Python 3
Using Multipartposthandler to Post Form-Data with Python
Python Method for Reading Keypress
Python Convert Tuple to String
How to Access Pandas Groupby Dataframe by Key
How to Make Environment Variable Changes Stick in Python
When Should I Subclass Enummeta Instead of Enum
Django Return Redirect() with Parameters
Pandas: Looking Up the List of Sheets in an Excel File
How to Use a Multiprocessing.Manager()
Checking If All Elements in a List Are Unique
Downloading File to Specified Location with Selenium and Python