0

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

  • It's `pip install --allow-external csnd`, not `pip allow-external ...`. – Lukas Graf May 18 '14 at 17:33
  • 1
    Instead of trying every command under the sun, why don't you [read a tutorial](http://simononsoftware.com/virtualenv-tutorial/). – Burhan Khalid May 18 '14 at 17:37
  • 1
    @BurhanKhalid - I didn't spot the part in the virtualenv tuturial that explains potential issues with installing externally hosted packages with pip. – tdelaney May 18 '14 at 18:46
  • I've used --allow-external and it responds with use unverified, which still didn't work. I have gone through the tutorial to find I was doing it the exact way specified I'm not sure what Burhan meant by trying every command under the sun. I've only used the ones people have specified using. My problem is csnd6 module doesn't appear anymore if I type help('modules') it used to appear there and still is in the site packages in the library. It's worked on my mums computer a minute ago by installing csound, and automatically pops up in help('modules'). But on my one I've lost it. – Crying in your Py May 18 '14 at 18:59
  • csnd is really hosted on sourceforge and I think the pypi link is busted. I tried installing on a windows system with `pip install --allow-unverified csnd csnd` (you need it twice...) and it failed. pip.log showed a lot of attempts to read urls. You could try going to http://sourceforge.net/projects/csound/ and downloading it manually. – tdelaney May 18 '14 at 19:23
  • Thank you so much for your help @tdelaney! I really hope that's the case. Seems that it works from installing Csound on my mums computer, the package seems like automatically installs the csnd6 module in library/site-packages but can only see it in help('modules') if I type python straight into terminal and not activate from a virtualenv. Really isn't clear on how to manually put in a virtualenv build without a setup.py file. – Crying in your Py May 18 '14 at 19:49
  • While [`pip`s syntax for `--allow-external` and `--allow-unverified` is very cumbersome](https://github.com/pypa/pip/issues/1423) (thanks @tdelaney for pointing out to specify `csnd` twice), the real problem here is that `csnd` is hosted externally to begin with. Registering packages on PyPi but not uploading the package there is just evil (Link-rot, getting through restrictive proxies, ...). IMHO the package author should be notified and told to upload it to PyPi (or remove it allogether if he doesn't care about properly packaging his stuff). – Lukas Graf May 19 '14 at 08:26

1 Answers1

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

Ve Pham
  • 303
  • 1
  • 9