当我在不同位置安装多个python时,如何升级特定的python库?

时间:2018-07-04 02:52:09

标签: python matplotlib pip

我正在使用OSX,在OSX上,我在文件系统上的不同位置安装了多个python。我想升级我的matplotlib库,当前版本为2.1.1,而最新版本为2.2.2。我尝试使用pip install --upgrade matplotlib,但它给出了一条消息(此处仅显示第一行)

Requirement already up-to-date: matplotlib in /usr/local/lib/python2.7/site-packages (2.2.2)

但是,我实际上打算升级过时的matplotlib软件包

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

我该如何实现?

1 个答案:

答案 0 :(得分:0)

使用完整的点子路径应该可以:

int key = 0; std::queue<AVpacket> Packet_buf; int thread1 (void) { AVPacket packet; packet = read_packet(); Packet_buf.push(packet); av_packet_unref(&packet); key = 1; } int thread2 (void) { AVPacket *packet; while(key==0) {} // wait to read the first packet *packet = Packet_buf.front(); // program halt here avcodec_send_packet(pCodecCtx,packet); } int main(); { thread p1(thread1); thread p2(thread2); }

但是,我建议研究Miniconda来管理多个Python安装及其软件包,或者至少研究virtualenv来仅管理软件包。

相关问题