Having problems while trying to download kivy - python

I am a new programmer and I wanted to develop an app using python. I found kivy and wanted to download it. I am using Visual Studio as my development habitat and whenever I tried to download kivy, it just didn't. I opened the command prompt and did as the tutorials said. Typed "pip", nothing happened. This led me to modify my python 3.7.3. But as I clicked on modify, it showed me that I already selected pip. I didn't know what to do. It would be much appreciated if someone replies. Thank you.

Assuming that you are running CMD from windows:
You may try python -m pip --help to get the usage help.
Just pip should show the help as well.
How to run Pip commands from CMD provides a brief explanation on pip with windows CMD
And kivy.org Installation on Windows may provide you with the CMD command to install it.
I hope that helps.

#MagnusO_O is right, but I would also like to mention that kivy isn't exactly tailored to new python developers... I would HIGHLY recommend that you start with pygame before you move on to kivy. Assuming that you have at least some grasp on python itself.
Pygame is MUCH simpler and more easy to understand than kivy. Assuming you have pip installed just type
pip install pygame
into cmd and let it download and you now have access to all of pygame.
Here are just a few guides for new devs and the docs

Related

My VS Code dont recognize the pip packages

Despite im used to program stuff, im new in Python so i decide to learn by myself.
So, i install VS code and python. At the moment i tryied to use stuff like tensorflow, is showing an error saying that my imports are missing.
I've already tryed to install everything again, search for a solution online and nothing worked.
If someone knows anything about how to fix this i'd be greatfull.
Whether there are multiple versions of python in your environment, which will make the pip installed in one version of python instead of the python you are using.
Use shortcuts "Ctrl+shift+P" and type "Python: Select Interpreter" to choose the correct python. Then use pip install packagename to reinstall the package which you need.
Generally, we recommend people new to python to use the conda virtual environment.
Confirm you have downloaded python correctly:
Open terminal
Run python --version
(if that doesn't work try python3 --version

Can I add my own modules to python in VS Code?

I've been using VS Code for some time now, and I can't figure out how to add my own modules. I've been wanting to use Pygame, but it's not in the marketplace.
As other people have mentioned, pygame is a python module, not a vscode extension. To install it, go to your vscode command prompt and type,
pip install (module name)
In your case, you would want:
pip install pygame
I've found the issue: I'm using a my school laptop and the firewall won't let me access the command prompt. Thanks anyways.

Installing/Using Pillow on Python 3.6 and Visual Studio

Alright, I need some pointers. I am missing something. I am trying to use Pillow through Python 3.6. The platform I use is Visual Studio 2017. I can't get it to work.
I downloaded Pillow from this website:
https://pypi.org/project/Pillow/
And ran the installer.
According to my research, I need pip to install it; which comes built-in python 3.6. I have seen sign that it is actually installed through my module in visual studio (pip 9.0.3). I simply need to use the following line:
from pip.commands import install
and also tried
import pip
Now, according to this:
https://pillow.readthedocs.io/en/5.2.x/installation.html
All I have to do is
pip install Pillow
Though other sites indicate that PIL is still being used. I have tried both without success. Pillow is not recognized and a error comes in: invalid syntax.
I am clearly doing something wrong. I consulted some youtube tutorial; they all skip that part. They download then go straight to their coding platform and it works.
I can only guess I have additional steps to do with Visual Studio.
Also... The location of my files might be out of whack due to IT security on my work laptop. Could that be an issue?
You can do the following:
python -m pip install pillow
No need to downloade Pillow from the website.
After that, to use it you can do:
import PIL
Thanks for the feedback. I played with Visual Studio some more; there is a way of getting it straight from the menu.
I opened a Python 3.6 project/solution. On the "Python Environment" node in the solution explorer, I right clicked and created a virtual Python environment.
Then I right clicked on the virtual environment and selected "Install Python Package...".
You can then search the package you need for your project.
I don't know if this is the most efficient way. From my research, I think the package are only applicable to my virtual environment; I still have to test that out to make sure.
I may have gone the long way around, but writing the proposed code did not work out. I am sure it works, but I am thinking I might not be using it in the right location.
Anyway, thanks for the help!

Python: installing psychopy audiolib

I'm really sorry if this is a stupid question, but here it is.
I'm using Python and I've installed psychopy via anaconda command prompt in class. Now I want to use psychopy sound functions. So I tried to import sound, but get that there's no API found and that I should install pyo or pygame, which I tried to do in the anaconda command prompt, but that doesn't work either.
Since I'm not familiar working with this kind of things, so I really have no idea how to solve this. I hope someone can help. I've tried looking on the internet, but can't find any solutions there either.
Both pygame and pyo cannot be installed with pip. You need to download them from external links and install manually.
pygame: http://www.pygame.org/download.shtml
pyo: http://ajaxsoundstudio.com/pyodoc/download.html
#edit Note that those packages will only work with 32-bit Python 2.7, so if you're using a 64-bit version of Python or Python 3.x you won't be able to use them.

Installing Pypotrace for python?

Did anybody manage to install pypotrace or is able to install mingwin it's like mission impossible for me I've passed the last 12 hours trying to found out how but nothing is working and description are poor please could any body help? This is where you can get it:
pypotrace web site
This problem was so much of a pain that I ported potrace to python directly rather than using hooks and requiring local compile.
pip install potracer
https://github.com/tatarize/potrace
I implemented the same API as pypotrace so it should be fairly painless.
Since you are working in windows you need the following steps:
You may need the python distutils package - pip install -U distuilts should do the job.
You will also need Cython - the windows installers are here.
You need to install mingw and make sure it is working in
msys mode - run msys and you should get a command prompt in it type
gcc --version and make sure you get a sensible reply.
also make sure your python runs from within msys
Do the required downloads:
potrace source,
agg source site broken or the GitHub zip file here,
potrace source from here and unzip it.
The follow the instructions at the link you gave and tell us where they stop working.

Categories

Resources