Python pip unable to locate pyodbc

前端 未结 6 497
不思量自难忘°
不思量自难忘° 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 06:58

    Both --allow-unverified and --allow-external take package name as an argument.

    From pip help install:
    --allow-external    Allow the installation of a package even if it
                                 is externally hosted
    --allow-unverified  Allow the installation of a package even if it 
                                 is hosted in an insecure and unverifiable way
    
    • --allow-external requires an argument (name of th external to allow).
    • Same goes for --allow-unverified too .
    • With pip install --allow-external pyodbc, you are allowing the external called pyodbc
    • pip install --allow-external pyodbc pydodbc is what you need, first pyodbc allows that external, second one actually tells pip which package to install.

      From pip help install: --allow-external Allow the installation of a package even if it is externally hosted --allow-unverified Allow the installation of a package even if it is hosted in an insecure and unverifiable way

    So your usage should be

    pip install --allow-unverified --allow-external

    or the little confusing:

    pip install --allow-unverified --allow-external

    DO NOT use --allow-all-external when you just want to allow one and not ALL. It kills the whole purpose of putting in the security check.

提交回复
热议问题