How to install python package with a different name using PIP

前端 未结 10 2054
忘了有多久
忘了有多久 2020-12-09 07:56

When installing a new python package with PIP, can I change the package name because there is another package with the same name?

Or, how can I change the existing p

10条回答
  •  南方客
    南方客 (楼主)
    2020-12-09 08:12

    I had this problem with the libraries gmail and pygmail, they both want to install to PYTHONPATH/site-packages/gmail/. Clearly the pygmail package has an issue, it should be installing to pygmail folder, but they haven't made any updates in years.

    For an interim solution, I installed one (pygmail), then changed the folder names (gmail-->pygmail, and gmail-v#.dist-info-->pygmail-v#.dist-info), then installed the second one normally. Seems to work, as long as I don't try to update the first package. import gmail and import pygmail work as expected.

提交回复
热议问题