Hansen Chen wrote:
I have found the answers to questions 2) and 3) in cloud.sagemath FAQ
<https://github.com/sagemath/cloud/wiki/FAQ#own-ipython> regarding
downloading from PyPi. Sorry for not checking FAQ more thoroughly before
posting. I am new to SAGE. Question 1) still remains as to how to check
whether a certain package is already in cloud.sagemath.

sage: is_package_installed("foo")
False

Note that (e.g.) optional_packages() (from the Sage prompt) is currently broken, but you can use 'sage --optional' in the shell.

But probably you're not that interested in /Sage/ packages, but "plain" Python packages.

In that case, you could use pkg_resources, e.g.

    import pkg_resources

    pkg_resources.get_distribution("foo") # may raise DistributionNotFound

    pkg_resources.get_distribution("foo").version

or simply try to 'import foo'... ;-)


-leif


On Wednesday, June 11, 2014 12:41:52 PM UTC-4, Hansen Chen wrote:

    I would like to do the following.

    1) Inspect the python packages that are already in the cloud.sagemath.

    2) Install new python packages that are not in cloud.sagemath.

    4) I tried in the command terminal the following python command to
    install a package called gensim.
    $ easy_install -U gensim
    and
    $ pip install --upgrade gensim
    such as what is shown in http://radimrehurek.com/gensim/install.html
    <http://radimrehurek.com/gensim/install.html>.
    It seems I do not have the permission to do this. I then tried
    $ sudo easy_install -U gensim
    I then typed in my cloud.sagemath password. It does not acknowledge
    it. I suppose the super user is the website administration not me.

    What should I do to install a new package in the cloud? Is the only
    option to install it locally on my own machine and add search path
    to the local package?

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to