How to install python package with a different nam

2019-02-11 14:54发布

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 package's name?

8条回答
啃猪蹄的小仙女
2楼-- · 2019-02-11 15:44

If you are struggling to install the correct package when using pip install 'module', you could always download its corresponding wheel file (.whl extension) and then install this directly using pip. This has worked for me in various situations in the past.

查看更多
兄弟一词,经得起流年.
3楼-- · 2019-02-11 15:45

Use virtualenv if you don't need both package for the same project. With virtualenv you can have different version of packages as well.

Another way maybe the site-packages as mentioned already.

https://virtualenv.pypa.io/en/stable/

http://docs.python-guide.org/en/latest/dev/virtualenvs/#lower-level-virtualenv

查看更多
登录 后发表回答