Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install pyodbc doesn't work (--allow-external is needed) #36

Closed
bittner opened this issue Apr 24, 2015 · 6 comments
Closed

pip install pyodbc doesn't work (--allow-external is needed) #36

bittner opened this issue Apr 24, 2015 · 6 comments

Comments

@bittner
Copy link

bittner commented Apr 24, 2015

Due to security requirements built-in into all newer pip versions a simple pip install pyodbc doesn't work anymore with a current version of pip. Example:

$ pip --version
pip 6.1.1 from /path/to/virtualenv/lib/python2.7/site-packages (python 2.7)
$ pip install pyodbc
Collecting pyodbc
  Could not find a version that satisfies the requirement pyodbc (from versions: )
  Some externally hosted files were ignored as access to them may be unreliable (use --allow-external pyodbc to allow).
  No matching distribution found for pyodbc

It is possible to make an installation work using some switches as follows, but this should not be necessary.

$ pip install -v --allow-external pyodbc --allow-unverified pyodbc pyodbc

The python dist package needs to be uploaded to the PyPI server to fix this problem, using something like:

$ python ./setup.py sdist upload

This is really a critical issue, not just a nice-to-have.

@mkleehammer
Copy link
Owner

I didn't realize that PyPI actually hosted files. I don't remember it doing so when it first started. (Maybe I just missed it.) Anyway, I've uploaded the sdist and I'll start doing the same for Windows binaries. Thanks for the heads up on this.

@bittner
Copy link
Author

bittner commented Apr 28, 2015

Thank you, that's awesome! pip install pyodbc now works, it pulls the current package from PyPI.

On Ubuntu installing the unixodbc-dev package is required though:

$ sudo apt-get install unixodbc-dev

This should be added to the documentation in the project Wiki (Building, FAQs). Looks like the Wiki is now already read-only on Google Code.

BTW, it looks like that package is only needed for compiling, then it can be uninstalled. Is there no way to make the install process not require the installation of a development package? Installing such a package is sometimes difficult to discuss with hosters.

@mkleehammer
Copy link
Owner

I'll add it to the docs. I don't think there is a way to avoid using unixODBC-dev. Well, it would be possible to provide a few binary uploads, I suppose. I've tried that for Windows.

@mkleehammer
Copy link
Owner

Regarding the docs, Google is closing Google Code Hosting so everyone has to move off of it. I'm in the process of porting the docs to Github.

@SimonaAlina
Copy link

I have the same error on macOS Sierra:

python --version
Python 2.7.10
pip --version
pip 6.1.1 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (python 2.7)
pip install pyobjc
Collecting pyobjc
  Could not find a version that satisfies the requirement pyobjc (from versions: )
  No matching distribution found for pyobjc

Could you help me, please?
Thanks!

@v-chojas
Copy link
Contributor

This project is named pyODBC, not pyOBJC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants