pip can't find latest versions of a pypi project - django

I'm trying to install http://pypi.python.org/pypi/django-crowdsourcing/1.1.21 using pip. I'm getting
$ pip install django-crowdsourcing==1.1.21
Downloading/unpacking django-crowdsourcing==1.1.21
Could not find a version that satisfies the requirement django-crowdsourcing==1.1.21 (from versions: )
No distributions matching the version for django-crowdsourcing==1.1.21
If I try an upgrade, it only finds version 1.1.19.
$ pip install -v --upgrade django-crowdsourcing
Downloading/unpacking django-crowdsourcing
Using version 1.1.19 (newest of versions: 1.1.19, 1.1.18, 1.1.17, 1.1.16, 1.1.15, 1.1.14, 1.1.13, 1.1.12, 1.1.11, 1.1.10, 1.1.9, 1.1.8, 1.1.7, 1.1.6)
Downloading django-crowdsourcing-1.1.19.tar.gz (651Kb): 651Kb downloaded
...
Successfully installed django-crowdsourcing
It looks like django-crowdsourcing version 1.1.21 has some good tags
$ hg tags
tip 289:8796aae85e34
1.1.21 288:2f39596495a7
1.1.20 281:fe00699aa3ff
1.1.19 278:17392ea8ea54
and the correct version number in setup.py
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import os
readme_file = os.path.join(os.path.dirname(__file__),
'README')
long_description = open(readme_file).read()
classifiers = [
'Development Status :: 4 - Beta',
'Framework :: Django',
'License :: OSI Approved :: MIT License']
setup(name='django-crowdsourcing',
version='1.1.21',
classifiers=classifiers,
description='Django app for collecting and displaying surveys.',
long_description=long_description,
author='Jacob Smullyan, Dave Smith',
author_email='jsmullyan#gmail.com',
url='http://code.google.com/p/django-crowdsourcing/',
packages=['crowdsourcing', 'crowdsourcing.templatetags'],
license='MIT',
)
PyPi clearly knows about version 1.1.21 since that's what comes up when you go to http://pypi.python.org/pypi/django-crowdsourcing/ Why does pip think version 1.1.19 is the latest version?
Edit
Sheepishly, I forgot to point out I'm the maintainer. #Matthew Schinckel is right. Here are the two commands I needed, which I found out from a tutorial I didn't see before: http://wiki.python.org/moin/Distutils/Tutorial
$ python setup.py register
$ python setup.py sdist upload

There is no packaged file at version 1.1.21. There is one at 1.1.19. Tags in hg mean nothing to pip: it will only download a packaged up file.
Perhaps contact the maintainer, and point out there is no file release with the two most recent versions on pypi.

Related

python - pip installs but cannot import

I've read a lot of posts about this but none of the solutions have worked for me. I'm trying to get a module called nsxramlclient installed, shows successful installation with pip but cannot import from any location outside of the /Users/Nathan/Library/Python/2.7/lib/python/site-packages.
Uninstall does work after some fidgeting with brew using the recommendations found with brew doctor. Here are some vitals:
Running OSX python 2.7.10
PIP 18.1
which -a pip = /usr/local/bin/pip
which -a python = shows 2 directories:
/usr/local/bin/python
/usr/bin/python
python -c 'import sys; print(sys.path)'
['', '/usr/local/Cellar/python#2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/usr/local/Cellar/python#2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/usr/local/Cellar/python#2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/usr/local/Cellar/python#2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/usr/local/Cellar/python#2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/local/Cellar/python#2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/usr/local/Cellar/python#2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/usr/local/Cellar/python#2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload']
pip list | grep nsxramlclient
nsxramlclient 2.0.7
It has to be a path issue since I'm able to import it from the directory that the module is located. I just don't know the proper method to repair this since I'm fairly new to Python and I don't want to mess it up worse that it is already.
Looks like I did end up getting it to work finally. What I had to do was to re-install python with brew:
brew re-install python#2
then I needed to re-install the modules I needed with pip. Having OTHER issues now but at least this one is fixed.

nltk module installation in pip through cmd

When I tried to run this command:
c:\python27\scripts\pip install nltk-3.2.1-py2.py3-none-any
I am getting the error:
no matching distribution found
Although i have installed nltk from
http://www.lfd.uci.edu/~gohlke/pythonlibs/#nltk
Kindly help.
I am working on Windows 8 64-bit Version
Installing new modules can be a nightmare if you are new to Python.First delete any old versions of NLTK if already installed. Open cmd navigate to C:\Users\user\AppData\Local\Programs\Python\Python35-32\Scripts, the default directory, using the command cd path_name_comes_here. Otherwise goto the path where you have installed python and goto the Scripts subfolder and use this path here onwards. Now the most preferred way is to use pip install module_you_want_to_install for anything in python. Pip automatically fetches everything it needs to install said module.
Simply use pip install nltk.
Another method is to use easy_install requirement_or_URL.
Some rare occasions its best to download the wheel from http://www.lfd.uci.edu/~gohlke/pythonlibs and from there you can simply use pip install downloaded_wheel_name again. But make sure to copy the name of the wheel EXACTLY.
Post installation make sure that your package is accessible from C:\Users\user\AppData\Local\Programs\Python\Python35-32\Lib\site-packages or a similar path depending on where you installed python.
Try Anaconda - Instead . Always works
C:\Users\sanan>conda install -c anaconda nltk
Fetching package metadata .............
Solving package specifications: .
Package plan for installation in environment C:\Users\sanan\Miniconda3:
The following NEW packages will be INSTALLED:
nltk: 3.2.4-py36_0 anaconda
The following packages will be UPDATED:
conda: 4.3.23-py36_0 --> 4.3.25-py36_0 anaconda
The following packages will be SUPERSEDED by a higher-priority channel:
conda-env: 2.6.0-0 --> 2.6.0-0 anaconda
Proceed ([y]/n)? y
conda-env-2.6. 100% |###############################| Time: 0:00:00 22.84 kB/s
nltk-3.2.4-py3 100% |###############################| Time: 0:00:02 774.24 kB/s
conda-4.3.25-p 100% |###############################| Time: 0:00:00 578.90 kB/s
After installation is complete .
import nltk
print(nltk.__version__)
C:\Public\Code\textnorm>python attempt1.py
3.2.4

No matching distribution found for 'package' in python wheel

I have written a python package called lyrico and uploaded the source dist and wheel to testpypi site.
lyrico
But when I try to install it from there using following command it gives errors:
pip install -i https://testpypi.python.org/pypi lyrico
Error logged in cmd-prompt:
Collecting lyrico
Using cached https://testpypi.python.org/packages/py2/l/lyrico/lyrico-0.2.5-py2-none-any.whl
Collecting mutagen (from lyrico)
Could not find a version that satisfies the requirement mutagen (from lyrico) (from versions: )
No matching distribution found for mutagen (from lyrico)
It is unable to find the dependency mutagen in wheel I uploaded. I have included dependencies in my setup.py:
install_requires = [
'mutagen',
'glob2',
'beautifulsoup4',
'win-unicode-console >= 0.4'
],
Weird thing is that if go to testPyPi page and manually download and install the wheel using (after cd to the containing dir):
pip install lyrico-0.2.5-py2-none-any.whl
it works and installs all the dependencies as well.
I am using Python 2.7.11 on a Windows7 system. Can someone please tell what is wrong or if the error is reproduce-able?

Pyinstaller freezes an invalid binary when includes ZMQ

I'm trying to freeze a binary with PyInstaller that includes ZMQ code. When testing the application everything works fine with Python interpreter, but final binary does not work at all.
Note: A different code is used here to illustrate and simplify the error:
try:
import zmq
zmq.Context()
except Exception, e:
print str(e)
print 'end'
Python version is 2.7.6, Operating System is CentOS 6.7 and I'm working with a virtual environment which includes the following packages:
(Compiler)[user#machine test]$ pip list
backports.ssl-match-hostname (3.4.0.2)
certifi (2015.9.6.2)
cffi (1.2.1)
cryptography (1.0.1)
Cython (0.23.1)
distribute (0.7.3)
enum34 (1.0.4)
futures (3.0.3)
idna (2.0)
ipaddress (1.0.14)
Jinja2 (2.8)
M2Crypto (0.22.3)
MarkupSafe (0.23)
msgpack-python (0.4.6)
npyscreen (4.10.0)
pip (7.1.2)
psutil (3.2.1)
pyasn1 (0.1.8)
pycparser (2.14)
pycrypto (2.6.1)
PyInstaller (2.1)
pyroute2 (0.3.14)
python-iptables (0.9.0)
pytz (2015.4)
PyYAML (3.11)
pyzmq (14.7.0)
requests (2.7.0)
salt (2015.5.5)
setuptools (18.0.1)
six (1.9.0)
tornado (4.2.1)
tzlocal (1.2)
wheel (0.24.0)
And this other rpm package has been installed through YUM tool:
[root#machine test]# rpm -qa | grep -i zmq
python-zmq-14.3.1-1.el6.x86_64
Case ONE: Works with Python Interpreter.
(Compiler)[user#machine test]$ python test.py
end
Case TWO: Does NOT work after PyInstaller.
(Compiler)[user#machine test]$ pyinstaller --onefile test.py
...
12135 INFO: building EXE from out00-EXE.toc
12136 INFO: Appending archive to EXE /test/dist/tes
(Compiler)[user#machine test]$ /test/dist/test
/tmp/_MEIl3jKVa/zmq/libzmq.so: undefined symbol: crypto_secretbox_open
end
What I'm missing? Thanks in advance!
Problem seems to be fixed by downgrading pyzmq version from 14.X to 13.X (eg: 13.1.0 has been tested successfully).
I think pyzmq includes pyNacl (libsodium) libraries on 14.X and onwards. However, I have also tried to freeze with Pyinstaller after installing pyNacl (0.3.0) in my virtual environment and I got the same error.
Does anyone knows how to do this with latest version of pyzmq?

"ImportError: ... Expected in: flat namespace" when setting up a mysql database

mySQL seems to be up and running just fine. But when I try to import MySQLdb into python I get a ImportError: ... Expected in: flat namespace. I think it has to do with having two different versions for python (well two different directories, same version)
OS: Mac 10.6.8
$ ls /Library/Frameworks/Python.framework/Versions/
7.2 Current
$ which python
/Library/Frameworks/Python.framework/Versions/Current/bin/python
$ echo $PATH
/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin
$ easy_install MySQL-python
...
...
Using /Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.5-i386.egg
...
$ mysql.server start
Starting MySQL
.. SUCCESS!
$ python manage.py runserver
...
...
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.5-i386.egg/_mysql.so, 2): Symbol not found: _mysql_affected_rows
Referenced from: /Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.5-i386.egg/_mysql.so
Expected in: flat namespace
in /Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.5-i386.egg/_mysql.so
$ python
Enthought Python Distribution (EPD) free version -- www.enthought.com
Version: 7.2-2 (32-bit)
>>> import MySQLdb
...
...
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.5-i386.egg/_mysql.so, 2): Symbol not found: _mysql_affected_rows
Referenced from: /Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.5-i386.egg/_mysql.so
Expected in: flat namespace
in /Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.5-i386.egg/_mysql.so
So in addition to being new to django and python I'm also new to using the terminal, and I'm not exactly sure what I'm looking at.
But I can tell the obvious:
I have two versions, 7.2 and current.
If I call python it will call the 'Current' version. That makes sense, it's in $PATH.
However, a version 2.7 (not 7.2) is also in PATH which I had deleted when I installed the EDP package. ...I don't fully understand what PATH is or does so I didn't want to start changing things
MySQL-python is installed in version 7.2
Can't run the server because a necessary file isn't in flat namespace and it's at the place it was installed too
Is there some way to untangle these paths (if that's the problem)
thank you in advance
Well... I don't think it had anything the do with the "Current" and "7.2" versions of python.
It seems to have fixed itself after doing
pip uninstall MySQL-python
brew uninstall mysql
brew install mysql --universal
pip install MySQL-python
I'm not sure if the --universal made the diference or using pip install as opposed to easy_install