question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installing in Windows

See original GitHub issue

I am trying to install photutils on windows, with a canopy environment.

After manually downloading and running “python setup.py install”, I get the following errors:

installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
copying photutils\_compiler.c -> build\lib.win-amd64-2.7\photutils
running build_ext
building 'photutils._compiler' extension
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Users\anakha272\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.3.0.1715.win-x86_64\include -IC:\users\anakha272\appdata\local\enthought\canopy\user\PC /Tcphotutils\_compiler.c /Fobuild\temp.win-amd64-2.7\Release\photutils\_compiler.obj
_compiler.c
photutils\_compiler.c(67) : warning C4005: 'COMPILER' : macro redefinition
        c:\users\anakha272\appdata\local\enthought\canopy\app\appdata\canopy-1.3.0.1715.win-x86_64\include\pyconfig.h(207) : see previous definition of 'COMPILER'
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\users\anakha272\appdata\local\enthought\canopy\user\libs /LIBPATH:C:\users\anakha272\appdata\local\enthought\canopy\user\PCbuild\amd64 /EXPORT:init_compiler build\temp.win-amd64-2.7\Release\photutils\_compiler.obj /OUT:build\lib.win-amd64-2.7\photutils\_compiler.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\photutils\_compiler.lib /MANIFESTFILE:build\temp.win-amd64-2.7\Release\photutils\_compiler.pyd.manifest
LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'
error: command '"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\link.exe"' failed with exit status 1104

I don’t understand what is going wrong. After this, I try to import photutils and I get the following error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-9345b59bbc41> in <module>()
----> 1 import photutils

C:\Users\anakha272\AppData\Local\Enthought\Canopy\User\Lib\site-packages\photutils-master\photutils\__init__.py in <module>()
     14
     15 if not _ASTROPY_SETUP_:            # noqa
---> 16     from .aperture import *        # noqa
     17     from .background import *      # noqa
     18     from .centroids import *       # noqa

C:\Users\anakha272\AppData\Local\Enthought\Canopy\User\Lib\site-packages\photutils-master\photutils\aperture\__init__.py in <module
>()
      6
      7 from .bounding_box import *    # noqa
----> 8 from .circle import *          # noqa
      9 from .core import *            # noqa
     10 from .ellipse import *         # noqa

C:\Users\anakha272\AppData\Local\Enthought\Canopy\User\Lib\site-packages\photutils-master\photutils\aperture\circle.py in <module>(
)
      9 from .bounding_box import BoundingBox
     10 from .mask import ApertureMask
---> 11 from ..geometry import circular_overlap_grid
     12 from ..utils.wcs_helpers import assert_angle_or_pixel
     13

C:\Users\anakha272\AppData\Local\Enthought\Canopy\User\Lib\site-packages\photutils-master\photutils\geometry\__init__.py in <module
>()
      4 """
      5
----> 6 from .circular_overlap import *       # noqa
      7 from .elliptical_overlap import *     # noqa
      8 from .rectangular_overlap import *    # noqa

ImportError: No module named circular_overlap

I don’t know if those two are related. Any help would be appreciated.

I am running python 2.7.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
noi26commented, Dec 10, 2019

@larrybradley Yes. you right. Thank you

0reactions
larrybradleycommented, Dec 9, 2019

@noi26 Are you by chance starting python from within a directory containing the photutils source code? If so, that will not work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Download Windows 10 - Microsoft
Create Windows 10 installation media · Attach the USB flash drive or insert the DVD on the PC where you want to install...
Read more >
Basic Computer Skills: Installing Software on Your Windows PC
Get help installing PC software on your computer, including installing software on Windows 10 devices, in this free lesson.
Read more >
How to install Windows 10 | Tom's Guide
1. Check your device meets the Windows 10 system requirements · 2. Create USB installation media. · 3. Run the installer tool. ·...
Read more >
How to Install New Windows and Flash Them
A comprehensive guide to window installation from a Marvin Windows expert · Cut Out the Opening · Angle-Cut the Corners · Fold Back...
Read more >
How to Install Windows 10 (with Pictures) - wikiHow
1. Connect a blank USB flash drive or insert a blank writable DVD. You can install Windows 10 by creating a bootable USB...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found