Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #93553

Re: Trying to import numpy

From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: Trying to import numpy
Date 2015-07-07 09:23 -0400
Organization IISS Elusive Unicorn
References <c55edf1c-56b7-44be-bc4d-5f74ffb3176b@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.341.1436275400.3674.python-list@python.org> (permalink)

Show all headers | View raw


On Mon, 6 Jul 2015 20:17:34 -0700 (PDT), ryguy7272 <ryanshuell@gmail.com>
declaimed the following:

>I'm trying to use numpy.  I get this error:
>>>> import numpy as np
>
>Traceback (most recent call last):
>  File "<pyshell#1>", line 1, in <module>

	I have no experience with whatever provides "pyshell". I'd suggest
running from a Windows command line to reduce dependencies.

>
>In the c-prompt, I get this error.
>C:\>python get-pip.py
>python: can't open file 'get-pip.py': [Errno 2] No such file or directory
>
	As has been mentioned, this looks for get-pip.py to be in the current
directory. Is it?

>
>In python 2.7, I get this error.
>>>> python get-pip.py
>SyntaxError: invalid syntax
>

	And one never invokes the python interpreter from within the python
interpreter. Python has no command named "python".


>
>I would say 100% of my errors come from importing python modules.  If this every worked, I could do some real work.  Instead, I spend 100% of my time trying to make thing that don't work, work.  
>
>
>I've already added ';C:\Python27' to the Path under Variable Name.  Of course, this makes no difference whatsoever.  Ugh.

	Which "Path"? The Windows search path? That is only used to tell
Windows where to look for the executable program -- the first word on the
command line "python". Arguments provided to an executable "get-pip.py"
need to be specified fully; if it isn't in the current directory you have
to provide the path to the directory that it IS in.

>
>Any thoughts?  Anyone?

	Presuming the import failures are all for third-party modules, the
first question would have to be: where and how are you installing those
modules

	I'll confess I've not really used PIP; I'm a few Python versions behind
(ActiveState 2.7.5.6), and most of my third party packages tended to be ZIP
files that one unpacks into a directory, then navigates to in a command
prompt and executes "python setup install" -- which commonly copies the
needed files into the active Python version "site" specific library, and if
needed modifies the Python import search path (which is independent of the
Windows path).
>Thanks.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Trying to import numpy ryguy7272 <ryanshuell@gmail.com> - 2015-07-06 20:17 -0700
  Re: Trying to import numpy Michael Torrie <torriem@gmail.com> - 2015-07-06 22:38 -0600
  Re: Trying to import numpy Chris Angelico <rosuav@gmail.com> - 2015-07-07 15:04 +1000
  Re: Trying to import numpy Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-07 08:00 +0100
  Re: Trying to import numpy Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-07-07 09:23 -0400
  Re: Trying to import numpy Terry Reedy <tjreedy@udel.edu> - 2015-07-07 12:32 -0400
  Re: Trying to import numpy Laurent Pointal <laurent.pointal@free.fr> - 2015-07-07 19:53 +0200

csiph-web