python not finding previously installed packages

爱⌒轻易说出口 提交于 2019-12-25 07:27:06

问题


Hi having a bit of a problem understanding what I've done wrong.

On mac osx 10.8.5 trying to find previously installed and working objects.

Import csnd6 doesn't work anymore after installing virtualenv.

I've used sudo pip install csnd and worked fine, I've used it days before, I can still see it in the 2.7 site packages in the library, but python seems not to be looking in library/python/2.7/site-packages

So I think it's because of installing virtual env afterwards. Or doing something that's not obvious to me.

I've done it the suggested way with virtual env now and have successfully installed packages with pip, but my problem is that pip is not recognising pypi packages now:

    Richards-MacBook-Pro-6:~ MouldySoul$ cd documents
    Richards-MacBook-Pro-6:documents MouldySoul$ cd dev
    Richards-MacBook-Pro-6:dev MouldySoul$ source bin/activate
    (DEV)Richards-MacBook-Pro-6:dev MouldySoul$ pip search csnd
    csnd - Python bindings for the Csound API. 
    (DEV)Richards-MacBook-Pro-6:dev MouldySoul$ pip install csnd
    Downloading/unpacking csnd
    Could not find any downloads that satisfy the requirement csnd 
    Some externally hosted files were ignored (use --allow-external csnd to
    allow).
    Cleaning up...
    No distributions at all found for csnd
    Storing debug log for failure in /Users/MouldySoul/.pip/pip.log 

pip search can find it, but doesn't want to install the module and I haven't had any joy using

pip allow-external csnd 

Any point in the right direction would be greatly appreciated


回答1:


If you want to tell Python looking in "/library/python/2.7/site-packages", just do some thing:

Open Eclipse -> Prefereces -> Pydev-> Interpreters-> Python Interpreter -> Libraries -> New Folder ->

then point to '/library/python/2.7/site-packages' -> Apply



来源:https://stackoverflow.com/questions/23724846/python-not-finding-previously-installed-packages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!