4

I'm really new to coding, programming, Python, and just computers in general, so I need some help with Canopy. I've been having pretty consistent troubles installing any packages to Canopy; some stuff is in the internal package manager,but whenever it isn't, it's really confusing. I guess I'll list a specific installation.

I'm trying to install "pywcs" (link provided below) to my Win7 64-bit machine. I have Cygwin if that helps at all. I do not know how to go about this; the stuff I found online is pretty confusing, and Cygwin easy_install (filename) never seems to work. Any step-by-step solutions?

Roman C
  • 49,761
  • 33
  • 66
  • 176
vdogsandman
  • 5,289
  • 8
  • 21
  • 21

5 Answers5

9

The way I installed astropy is as follows.

  1. Open Windows Terminal
  2. Change Directory to C:\Users\<USER NAME>\AppData\Local\Enthought\Canopy32\User\Scripts
  3. Type easy_install.exe astropy
  4. Wait until the download completes, and restart Enthought.

Astropy

Sukrit Kalra
  • 33,167
  • 7
  • 69
  • 71
  • Hmmm it seemed to install, but it still doesn't read the module in Canopy. Is there a fix for that? EDIT: I use Canopy 64-bit, so that might be the problem. I'll update this comment if it works under that directory. – vdogsandman Jul 08 '13 at 19:38
  • Would a similar installation procedure work for pygame? http://www.pygame.org/download.shtml – vdogsandman Jul 08 '13 at 22:09
  • Didn't work for me, and astropy *isn't* included in Canopy, at least in 1.1.0. Also, installing astropy like that only works for 32 bit, as it then uses the exe from pypi. There's no 64 bit exe there yet. – letmaik Dec 30 '13 at 20:13
  • While this answer should work, it is incomplete and can be misleading. For more context, see https://support.enthought.com/entries/23389761-Installing-packages-into-Canopy-User-Python-from-the-OS-command-line – Jonathan March Oct 11 '14 at 12:23
3

sometimes installing packages can be hard for enthought canopy . You could install all python packages using pip install mrjob command on the its own canopy command prompt

  1. Go to tools tab on the canopy editor ,
  2. Left click on the canopy command prompt ,
  3. Finally pip install <package name> and hit Enter key
pcpcne
  • 43
  • 2
  • 11
2

The key point is that in order to install a package into any Python distribution (including Canopy Python), you should use that Python to perform the installation. You refer to Cygwin's "easy_install", but you should instead use Canopy's easy_install.

As described in this article, the easiest way to be sure that you are running Canopy's Python (and Canopy's easy_install) is to have Canopy Python on your PATH. This is done by default during Canopy installation, but if you uncheck this option then, or if your Cygwin installation doesn't use your Windows PATH, then you will need to adjust your Cygwin PATH accordingly.

Doing as Sukrit suggests, and running the installation from the Canopy Python Scripts directory, is also a reasonable approach.

Alternatively, depending on its compiler dependencies, you may be able to install astropy from a Windows Command Prompt rather than from Cygwin (of course Canopy must be on the PATH here too, as it would be by default.)

Jonathan March
  • 5,800
  • 2
  • 14
  • 16
0

In Linux you can do it as follows.

1) Make sure you are using the Canopy version of Python - check out https://support.enthought.com/entries/23389761-Installing-packages-into-Canopy-User-Python-from-the-command-line

2) At the command prompt use easy_install, for example:

$ easy_install pp==1.5.7 

to install version 1.5.7 of pp

wSmit
  • 421
  • 5
  • 4
0

Just for information, Astropy is now included by default in Enthought Canopy:

https://www.enthought.com/products/canopy/package-index/

astrofrog
  • 32,883
  • 32
  • 90
  • 131