Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pynmea2
#1
my question here:

I am trying to d'load pynmea2 but face the foll.: 
Is there a website to d'load it from? I could only find a link where I can copy it which I did but ended up with several error i.e. it had some tags which created errors in the program unless deleted. It is a big program, so deleting takes time. In addition, after deleting, I got into indent/unindent errors, so gave up!
Any help on d'loading without errors and then using on NMEA  data are appreciated - Thanks
my code here
Reply
#2
Did you try
pip install pynmea2
Which downloads and installs it from https://pypi.python.org/pypi/pynmea2/1.7.1

How have you been installing and what is. The exact error?
Recommended Tutorials:
Reply
#3
Tried it get error "invaid syntax"
Reply
#4
pip command does not go into the python interpreter (ie. >>>), but the system command prompt, (in windows it would be C:\
https://python-forum.io/Thread-Basic-Pyt...er-Windows

Also you need to give full input/output to help us help you
Recommended Tutorials:
Reply
#5
Thanks.
Yes, I tried it under the C: command and also under Enthought Canopy, get the same error:

pip instal pynmea2
File "<ipython-input-2-22bcb2e2cef1>", line 1
pip instal pynmea2
^
SyntaxError: invalid syntax

I am using Python 2.7.9
Reply
#6
Quote:pip instal pynmea2
^
SyntaxError: invalid syntax
You are not running it in the command prompt. You wont get a syntax error in the command prompt. You only get a syntax error if your trying to run it as code...in which it is invalid syntax.
Recommended Tutorials:
Reply
#7
You're typing it into the interpreter.  Don't do that, pip means nothing to the interpreter, it's nonsense.  pip is an unrelated program that was installed along with python... you use it directly from the command line.  

D:\Projects>python
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> pip install anything
 File "<stdin>", line 1
   pip install anything
             ^
SyntaxError: invalid syntax
>>> exit()

D:\Projects>pip install pygame
Requirement already satisfied: pygame in d:\programs\python\lib\site-packages
Reply
#8
Tutorial cmd.
Reply
#9
Thanks for clarifying.
I did it on the cmd line i.e. C:\\ prompt and got "pip is not recognized as an internal or external command, operable program or batch file."
I also did using interpreter and got (as you said) "invalid syntax" So am stuck as cannot d'load pynmea2.
I pasted below:

Microsoft Windows [Version 6.1.7601]
Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\Dell>c:\\Python27
'c:\\Python27' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Dell>..
'..' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Dell>cd
C:\Users\Dell

C:\Users\Dell>cd c:
C:\Users\Dell

C:\Users\Dell>cd c:\\

c:\>cd Python27

c:\Python27>pip install pynmea2
'pip' is not recognized as an internal or external command,
operable program or batch file.

c:\Python27>dir
Volume in drive C has no label.
Volume Serial Number is D40F-D90F

Directory of c:\Python27

05/16/2017 08:46 PM <DIR> .
05/16/2017 08:46 PM <DIR> ..
05/16/2017 08:45 PM <DIR> DLLs
05/16/2017 08:45 PM <DIR> Doc
05/16/2017 08:45 PM <DIR> include
05/16/2017 08:45 PM <DIR> Lib
05/16/2017 08:45 PM <DIR> libs
12/17/2016 08:49 PM 38,591 LICENSE.txt
12/17/2016 08:34 PM 474,595 NEWS.txt
12/17/2016 08:44 PM 27,136 python.exe
12/17/2016 08:44 PM 27,648 pythonw.exe
12/03/2016 09:01 PM 56,938 README.txt
05/16/2017 08:46 PM <DIR> Scripts
05/16/2017 08:45 PM <DIR> tcl
05/16/2017 08:45 PM <DIR> Tools
12/17/2016 08:44 PM 111,104 w9xpopen.exe
6 File(s) 736,012 bytes
10 Dir(s) 86,362,341,376 bytes free

c:\Python27>python.exe
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (
Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> cd..
File "<stdin>", line 1
cd..
^
SyntaxError: invalid syntax
>>> cd c
File "<stdin>", line 1
cd c
^
SyntaxError: invalid syntax
>>> cd c:\\
File "<stdin>", line 1
cd c:\\
^
SyntaxError: invalid syntax
>>> cd c:
File "<stdin>", line 1
cd c:
^
SyntaxError: invalid syntax
>>>
Reply
#10
pip should come with Python 2.7.9.
Open the Windows cmd ( CTRL+R, type cmd and hit Enter )
Navigate to C:\Python27\Scripts
Type:
cd Python27\Scripts

and press Enter

Then type:
dir

If you see pip there, you have it installed.
What you need to do it is to add the path to Python27 in your system PATH environment variable.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020