Pip install to custom target directory and exclude specific dependencies

前端 未结 3 1874
野的像风
野的像风 2021-02-07 03:12

I\'m looking for a method to use pip or similiar to install a list of python packages to a custom target directory (ex./mypath/python/pkgs/ ), but also exclude/blacklist

3条回答
  •  囚心锁ツ
    2021-02-07 03:51

    Faced with a similar problem, and using a running bash shell I managed to exclude specific packages with

    pip install $(grep -ivE "pkg1|pkg2|pkg3" requirements.txt)
    

    where pkg1 and so on are the names of the packages to exclude.

提交回复
热议问题