Python pip unable to locate pyodbc

前端 未结 6 513
不思量自难忘°
不思量自难忘° 2020-12-24 06:51

Using virtualenv and just trying to install pyodbc. All resources I can find claim this should be extremely straightforward. After all the basic installs of MySQL, etc., jus

6条回答
  •  盖世英雄少女心
    2020-12-24 07:08

    I just tried installing pyodbc as well and hit the same wall. I think the problem you and I both hit is that --allow-external consumes the next argument as well. So you actually need to write:

    sudo pip install --allow-external pyodbc pyodbc
    

    I then hit another error about unverified sources so that command that actually worked for me was:

    sudo pip install --allow-external pyodbc --allow-unverified pyodbc pyodbc
    

    Note that once that was done the permissions on the installed files prevented normal users from access pyodbc. So I went in manually adjusted the permissions on all installed packages (seemed easier than finding just the files needed by pyodbc).

    cd /usr/local/lib/python2.7/
    chmod -R o=g dist-packages
    

    As per the suggestion of EMS I have added an issue to the Pip bug tracker. It can be found at:

    https://github.com/pypa/pip/issues/1893

提交回复
热议问题