How do you uninstall a python package that was installed using distutils?

前端 未结 12 2431
我在风中等你
我在风中等你 2020-11-30 00:36

Can you simply delete the directory from your python installation, or are there any lingering files that you must delete?

12条回答
  •  自闭症患者
    2020-11-30 00:46

    On Mac OSX, manually delete these 2 directories under your pathToPython/site-packages/ will work:

    • {packageName}
    • {packageName}-{version}-info

    for example, to remove pyasn1, which is a distutils installed project:

    • rm -rf lib/python2.7/site-packages/pyasn1
    • rm -rf lib/python2.7/site-packages/pyasn1-0.1.9-py2.7.egg-info

    To find out where is your site-packages:

    python -m site
    

提交回复
热议问题