top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to turn a package into something pip can install

+2 votes
536 views

I want to use (https://github.com/timetric/python-metar). Our deployment process more or less requires that it be installed via pip. We maintain our own cache of packages and install using:

pip install --no-index --quiet --find-links packages --requirement requirements.txt 

What I can't figure out is what I need to do to go from a clone of the github repo to a tarball I can drop into our packages directory. Is there some tutorial somewhere that explains this?

posted Feb 15, 2014 by Satish Mishra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Try

 python setup.py sdist 
answer Feb 15, 2014 by Jagan Mishra
Similar Questions
0 votes

PIP is package manager for Python. I found someone installing with using PIP3.

Can anyone explain what is PIP3 and difference from PIP?

+3 votes

Here is what I have tried:

root@secure [~]# which python3
/usr/bin/python3

root@secure [~]# which pip
/usr/bin/pip

root@secure [~]# yum install pip3
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.secrel.com.br
 * epel: mirror.imt-systems.com
 * extras: centos.secrel.com.br
 * remi: mirror5.layerjet.com
 * updates: mirrors.ucr.ac.cr
Setting up Install Process
No package pip3 available.
Error: Nothing to do
+1 vote

I want to install path.py in my Python 3.4 environment on a Centos 5 box. My /usr/local/bin/ contains:

easy_install-3.4 
python3.4  
etc. 

We are behind a proxy server and I tried this:

# /usr/local/bin/easy_install-3.4 path.py 

Searching for path.py 
Reading https://pypi.python.org/simple/path.py/ 
Download error on https://pypi.python.org/simple/path.py/: hostname '172.29.68.1  
' doesn't match either of 'www.python.org', 'python.org', 'pypi.python.org',  
'docs.python.org', 'testpypi.python.org', 'bugs.python.org', 'wiki.python.org',  
'hg.python.org', 'mail.python.org', 'packaging.python.org', 'pythonhosted.org',  
'www.pythonhosted.org', 'test.pythonhosted.org', 'us.pycon.org', 'id.python.org' --  
Some packages may not be found! 

Couldn't find index page for 'path.py' (maybe misspelled?), Am I best to use pip or easy_install? also if easy_install, how can I fix the above error?

+1 vote
avinash@dell ~ $ sudo pip install django-tracking

Downloading/unpacking django-tracking
Downloading django-tracking-0.4.1.tar.gz (1.9MB): 1.9MB downloaded
Running setup.py (path:/tmp/pip_build_root/django-tracking/setup.py) egg_info for package django-tracking
Traceback (most recent call last):
File "", line 17, in
File "/tmp/pip_build_root/django-tracking/setup.py", line 6, in
import tracking
File "tracking/__init__.py", line 1, in
import listeners
File "tracking/listeners.py", line 6, in
from django.core.cache import cache
File "/usr/local/lib/python2.7/dist-packages/django/core/cache/__init__.py", line 34, in
if DEFAULT_CACHE_ALIAS not in settings.CACHES:
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 46, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 40, in _setup
% (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting CACHES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "", line 17, in

File "/tmp/pip_build_root/django-tracking/setup.py", line 6, in

import tracking

File "tracking/__init__.py", line 1, in

import listeners

File "tracking/listeners.py", line 6, in

from django.core.cache import cache

File "/usr/local/lib/python2.7/dist-packages/django/core/cache/__init__.py", line 34, in

if DEFAULT_CACHE_ALIAS not in settings.CACHES:

File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 46, in __getattr__

self._setup(name)

File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 40, in _setup

% (desc, ENVIRONMENT_VARIABLE))

django.core.exceptions.ImproperlyConfigured: Requested setting CACHES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

+1 vote

Whenever I run the Leo editor (a Python application) from Windows (8.1), there is always an event log window in the background. I want to turn it off.

It was suggested to me on another forum that I use pythonw.exe instead of python.exe to prevent the window from being displayed, but I don't know how to do this, because it is all automatic: I just click on the .py file, and the python interpreter is automatically loaded.

Could someone please tell me how to disable the event log window?

...