Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pip - how to use it?
#1
Purchased a book on Python Game Programming and got stuck after chapter 1.
At the start of chapter 2 i was told to type in: $pip --version and also $pip install cocos2d
I tried entering both of those commands in Python IDLE, and in the various Python folders using windows command prompt.
In all cases I met with failure.
Any ideas from anyonee?
Quote
#2
Take a look  at Python 3.6 and pip installation under Windows,
Python environment Windows
Quote
#3
(Jun-30-2017, 06:05 AM)amgp Wrote: At the start of chapter 2 i was told to type in: $pip --version and also $pip install cocos2d
I tried entering both of those commands in Python IDLE, and in the various Python folders using windows command prompt.
In all cases I met with failure.
first of all you dont put that command in the python. And IDLE is just a fancy text editor. You put that command into the system command prompt. Second of all the $ symbol is a prompt and is not part of the command.

Quote:In all cases I met with failure.
More info. Exactly what was failed? How? What did you input? What did that output? Make sure to follow snippsat's linked tutorial thats shows that python is in the PATH and pip is installed. After that, just type into your command prompt
pip install cocos2d
*Describe the environment in which it occurs.                                    *Describe the symptoms of your problem clearly.
*Describe the research you did to try and understand the problem.      *Describe the goal, not the step. 
*Use meaningful, specific subject headers                                          *Write in clear, grammatical, correctly-spelled language
*Describe the problem's symptoms, not your guesses                         *Describe your problem's symptoms in chronological order
*Describe the diagnostic steps you took to try and pin down the problem yourself.
*Describe any possibly relevant recent changes in your computer or software configuration. 
*Provide a way to reproduce the problem in a controlled environment.
Quote
#4
Once you get pip working correctly, bear in mind you need to install 'pyglet' before you install 'cocos2d'.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.2, freeBSD 11, Raspian "Jessie"
Python 3.6.2, IDE: PyCharm 2017 Community Edition
Quote
#5
(Jun-30-2017, 02:03 PM)sparkz_alot Wrote: Once you get pip working correctly, bear in mind you need to install 'pyglet' before you install 'cocos2d'.
i wasnt aware that pyglet was required for cocos2d
*Describe the environment in which it occurs.                                    *Describe the symptoms of your problem clearly.
*Describe the research you did to try and understand the problem.      *Describe the goal, not the step. 
*Use meaningful, specific subject headers                                          *Write in clear, grammatical, correctly-spelled language
*Describe the problem's symptoms, not your guesses                         *Describe your problem's symptoms in chronological order
*Describe the diagnostic steps you took to try and pin down the problem yourself.
*Describe any possibly relevant recent changes in your computer or software configuration. 
*Provide a way to reproduce the problem in a controlled environment.
Quote
#6
(Jun-30-2017, 04:06 PM)metulburr Wrote: i wasnt aware that pyglet was required for cocos2d

I believe I'm reading this correctly cocos2d download, though it wouldn't be the first time I've been wrong  Tongue

EDIT:
This might be a better link, it shows other possible dependencies as well: cocos2d dependencies
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.2, freeBSD 11, Raspian "Jessie"
Python 3.6.2, IDE: PyCharm 2017 Community Edition
Quote
#7
You need go no further than pypi:

cocos2d:
Quote:Requirements

Software:

python 2.6, 2.7 or 3.3+
pyglet 1.2 or newer (http://www.pyglet.org)
Linux, Windows or Mac OS/X

Hardware:

To execute some effects you will need a video card with the:

GL_EXT_framebuffer_object extension.
Quote
#8
(Jun-30-2017, 02:03 PM)sparkz_alot Wrote: bear in mind you need to install 'pyglet' before you install 'cocos2d'.
That's  requirement is written in setup.py
install_requires.append('pyglet>=1.2')
Additional dependencies that can be needed like numpy,Avibin,Pygame is not in setup.py.

I have a plain to write a tutorial about Packaging/Modules/setup.py and all that stuff.
Have started to think of how to do it Undecided

So if install cocos2d with pip 9.0.1 and Python 3.6.
It look like this.
C:\
λ pip install cocos2d
Collecting cocos2d
 Downloading cocos2d-0.6.4.zip (5.2MB)
   100% |████████████████████████████████| 5.2MB 146kB/s
Requirement already satisfied: six>=1.4 in c:\python36\lib\site-packages (from cocos2d)
Collecting pyglet>=1.2 (from cocos2d)
 Using cached pyglet-1.2.4-py3-none-any.whl
Building wheels for collected packages: cocos2d
 Running setup.py bdist_wheel for cocos2d ... done
 Stored in directory: C:\Users\Tom\AppData\Local\pip\Cache\wheels\39\f2\61\a6540702af5bb7f2c4a8997acdfadf33a685efd9f7c47af48c
Successfully built cocos2d
Installing collected packages: pyglet, cocos2d
Successfully installed cocos2d-0.6.4 pyglet-1.2.4
Just as in additional info there is no need to download wheel from Gohlke.
with pip 9.0.1 and Python 3.6.
It will find wheel and use it
Earlier version pip and Python on Windows did not do that.
Example:
C:\
λ pip install numpy
Collecting numpy
 Downloading numpy-1.13.0-cp36-none-win32.whl (6.8MB)
   100% |████████████████████████████████| 6.8MB 121kB/s
Installing collected packages: numpy
Successfully installed numpy-1.13.0
C:\
λ pip install pygame
Collecting pygame
 Downloading pygame-1.9.3-cp36-cp36m-win32.whl (4.0MB)
   100% |████████████████████████████████| 4.0MB 187kB/s
Installing collected packages: pygame
Successfully installed pygame-1.9.3
Quote
#9
(Jun-30-2017, 08:17 PM)snippsat Wrote: I have a plain to write a tutorial about Packaging/Modules/setup.py and all that stuff.
Have started to think of how to do it

Look forward to it
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.2, freeBSD 11, Raspian "Jessie"
Python 3.6.2, IDE: PyCharm 2017 Community Edition
Quote
#10
Quote:I have a plain to write a tutorial about Packaging/Modules/setup.py and all that stuff.
Have started to think of how to do it Undecided
I look forward to it as well. This is an area where I am weak.
Quote

Top Page

Forum Jump:


Users browsing this thread: 1 Guest(s)