3

I have a question which is very similar to Import Error: No module named numpy but the answer to that question I do not believe would be appropriate for me, so I'm asking again.

importerror cmd

This is my most recent effort after about six hours of trying to get modules to work in python (numpy is a dependency of something else), so I'm finally turning to SO. Part of efforts in the last six hours included installing the enthought distribution, as its large volume of libraries was highly advised for windows users. I've even thrown the location of numpy folder onto the path of environment variables just to exclude it as a possibility.

Windows, 64bit, Python 2.7

7
  • Not a solution, but a recommendation: Always use virtual environments, with virtualenv or mkvirtualenv. Commented Feb 12, 2017 at 17:03
  • Make sure that the pip line and the python line use the same python version. Commented Feb 12, 2017 at 17:03
  • @AndrasDeak okay: sounds possible. Any idea how I might do that? Commented Feb 12, 2017 at 17:11
  • 1
    @Stumbler Everything gets to play with the main Python environment. A virtual one is isolated, and minimal, and will use the versions of python, tools and libreares specified. Commented Feb 12, 2017 at 17:16
  • 1
    @AndrasDeak okay, it's fairly similar in windows. pip cites enthought distribution directory (python 2.7) while python version says specifically 2.7.9 ... so I doubt there's a conflict at that end... Commented Feb 12, 2017 at 17:17

2 Answers 2

1

Since you are on windows, I highly recommend that you install ANACONDA. This way the environment variables are set automatically and you don't need to worry about anything else. There are many useful packages (e.g. numpy, sympy, scipy) which are bundled with anaconda.

Moreover, based on personal experience I can tell you that using pip on windows and compiling from source (you need visual studio) is a pain in the neck sometimes. That's why ANACONDA has been conceived.

Hope this helps.

Sign up to request clarification or add additional context in comments.

3 Comments

Okay... half way there... Anaconda knows what numpy is... but python scripts in general still don't. Hmm
... and removing all trace of python27 in system environment variables while ensuring that anaconda is on user environment variables seems to have sorted that out. Christ what a mess of a language.
this is not an answer. THIS IS AN ALTERNATIVE!
1

For python versions > 3.4 ,do this pip install numpy beacuse pip is python dependency which installs packages just like npm in js i.e. node.js

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.