All you need to do is run
pip install /opt/mypackage
and pip will search /opt/mypackage
for a setup.py
, build a wheel, then install it.
The problem with using the -e
flag for pip install
as suggested in the comments and this answer is that this requires that the original source directory stay in place for as long as you want to use the module. It’s great if you’re a developer working on the source, but if you’re just trying to install a package, it’s the wrong choice.
Alternatively, you don’t even need to download the repo from Github at all. pip supports installing directly from git repos using a variety of protocols including HTTP, HTTPS, and SSH, among others. See the docs I linked to for examples.
Related Posts:
- What is the result of % in Python?
- Error: ‘int’ object is not subscriptable – Python
- Python Variable Declaration
- How do I compare two strings in python?
- TypeError: ‘int’ object is not callable
- working of \n in python [duplicate]
- Pip freeze vs. pip list
- Cannot find module cv2 when using OpenCV
- Cannot find module cv2 when using OpenCV
- RuntimeWarning: invalid value encountered in divide
- WinError 2 The system cannot find the file specified (Python)
- IndexError: tuple index out of range —– Python
- sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)
- sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)
- TypeError: cannot perform reduce with flexible type
- Could not find a version that satisfies the requirement tensorflow
- sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)
- Could not find a version that satisfies the requirement tensorflow
- Local variable referenced before assignment?
- How to uninstall Python 2.7 on a Mac OS X 10.6.4?
- ImportError: numpy.core.multiarray failed to import
- Python Traceback (most recent call last)
- Unable to plot Double Bar, Bar plot using pyplot for ndarray
- How to pip or easy_install tkinter on Windows
- pip or pip3 to install packages for Python 3?
- ImportError: numpy.core.multiarray failed to import
- How to remove \xa0 from string in Python?
- What is the meaning of [:] in python [duplicate]
- Why are Python’s ‘private’ methods not actually private?
- Remove list from list in Python
- How to create a new text file using Python
- Unzip all zipped files in a folder to that same folder using Python 2.7.5
- TypeError: write() argument must be str, not bytes (Python 3 vs Python 2 )
- python socket.error: [Errno 98] Address already in use
- How to import files in python using sys.path.append?
- How do I install the yaml package for Python?
- Change figure size and figure format in matplotlib
- How to install PIP on Python 3.6?
- how does \r (carriage return) work in Python
- What is Python buffer type for?
- AttributeError(“‘str’ object has no attribute ‘read'”)
- Python Save to file
- Add list to set?
- Create 3D array using Python
- ImportError: No module named scipy
- Checking whether pip is installed?
- Decoding UTF-8 strings in Python
- How can I read pdf in python?
- How to have an array of arrays in Python
- ValueError: unsupported pickle protocol: 3, python2 pickle can not load the file dumped by python 3 pickle?
- ValueError: unsupported pickle protocol: 3, python2 pickle can not load the file dumped by python 3 pickle?
- AttributeError(“‘str’ object has no attribute ‘read'”)
- How to use 2to3 properly for python?
- Why does using from __future__ import print_function breaks Python2-style print?
- How to fix: “UnicodeDecodeError: ‘ascii’ codec can’t decode byte”
- Python – ‘ascii’ codec can’t decode byte
- Python Error – int object has no attribute
- Difference between scikit-learn and sklearn
- Loading a file with more than one line of JSON into Pandas
- How can I selectively escape percent (%) in Python strings?
- Type error Unhashable type:set
- How to detect key presses?
- How to have a set of sets in Python?
- Python: count repeated elements in the list
- How to XOR two strings in Python
- TypeError: ‘_io.TextIOWrapper’ object is not subscriptable
- Copy a list of list by value and not reference
- Why is parenthesis in print voluntary in Python 2.7?
- matplotlib: RuntimeError: Python is not installed as a framework
- Python 101: Can’t open file: No such file or directory
- Split a python list into other “sublists” i.e smaller lists
- TypeError: argument of type ‘NoneType’ is not iterable
- Fast ping sweep in python
- If list index exists, do X
- Numpy, multiply array with scalar
- TypeError: coercing to Unicode: need string or buffer, list found
- Installation of pygame with Anaconda
- Python can’t find module NLTK
- urllib and “SSL: CERTIFICATE_VERIFY_FAILED” Error
- ‘virtualenv’ is not recognized as an internal or external command, operable program or batch file
- ImportError: cannot import name NUMPY_MKL
- Python: Pandas pd.read_excel giving ImportError: Install xlrd >= 0.9.0 for Excel support
- How can I copy a Python string?
- TypeError: super() takes at least 1 argument (0 given) error is specific to any python version?
- Convert string to variable name in python
- What is the meaning of “int(a[::-1])” in Python?
- Adding +1 to a variable inside a function
- dump() missing 1 required positional argument: ‘fp’ in python json
- How to completely uninstall python 2.7.13 on Ubuntu 16.04
- Spell Checker for Python
- Installing scipy for python 2.7
- Install py2exe for python 2.7 over pip: this package requires Python 3.3 or later
- ImportError: No module named IPython
- How can I install a .egg Python package on Windows (attempt using easy_install not working)
- In python, how can I print lines that do NOT contain a certain string, rather than print lines which DO contain a certain string:
- input() error – NameError: name ‘…’ is not defined
- Symbol not found: __PyCodecInfo_GetIncrementalDecoder
- Python 2.7 mixing iteration and read methods would lose data
- Homebrew brew doctor warning about /Library/Frameworks/Python.framework, even with brew’s Python installed
- Cannot remove entries from nonexistent file