I've coded a game in Pygame using Pycharm, and I want to make it into a downloadable desktop application so that other people can download and use it even if they do not have python or the necessary files. The problem is I don't know how to. I've heard of py2exe and py2app before. I tried py2exe but then realized that .exe was for windows, and I was using a Mac. I read the py2app documentation, but it was very confusing and hard to understand, and none of the things they said worked. They said to use the pip command to install py2app inside the terminal, but I tried it and it said that it did not recognize the pip command. Can someone please help? Thanks!
Sorry if this question is long. I am trying to tell as much information as possible.
You can use pyinstaller if you package the application in Mac OS it will run on Mac.
Click here for instruction on how to install the package and use it.
Which installation of Python do you use? I had bad experience with Homebrew when it came to packaging, then I've removed it and switched to Python3.9 downloaded directly from python.org and everything works well now.
Depending on your Python installation, it is possible that you don't have pip installed on your computer. Via terminal, you can check it using
python -m pip --version
and you should get a response of this type:
pip X.Y.Z from .../site-packages/pip (python X.Y)
If you don't have pip, you can either re-install Python as mentioned above, or you can just install pip using these instructions.
As soon as you have pip installed, you can install py2app using
pip install py2app
Related
I have explored many other questions about the installation of pip on Windows. However, I have had no luck.
I have seen for Python 3.4+ that pip comes with it. I can see pip in the site-packages folder, but trying to run pip -V I get a ModuleNotFoundError.
I successfully added python to the PATH. I then downloaded the get-pip.py file and ran. I made cure to add C:.../Scripts to PATH. Again I tried pip -V and had the same issue.
Also tried python -m pip -V as suggested in the comments and got this error:
C:\Users\apowell\Documents\python-3.7.4-embed-amd64\python.exe: No module named pip
I'm a little lost now on how to successfully use pip. Any help would be appreciated.
EDIT:
For further details, I am doing this all on a virtual machine. I have python/pip all set up on my local machine. What would be the process for copying from my local machine to the VM?
Looks like you are using the embeddable package. It is not meant to be used as is. You should probably try installing Python with the full installer instead. Here is the full installer for Python 3.7.4 Windows 64 bits.
I tried to run a python script on my mac computer, but I ended up in troubles as it needed to install pandas as a dependency.
I tried to get this dependency, but to do so I installed different components like brew, pip, wget and others including different versions of python using brew, .pkg package downloaded from python.org.
In the end, I was not able to run the script anyway.
Now I would like to sort out the things and have only one version of python (3 probably) working correctly.
Can you suggest me the way how to get the overview what I have installed on my computer and how can I clean it up?
Thank you in advance
Use brew list to see what you've installed with Brew. And Brew Uninstall as needed. Likewise, review the logs from wget to see where it installed things. Keep in mind that MacOS uses Python 2.7 for system critical tasks; it's baked-into the OS so don't touch it.
Anything you installed with pip is saved to the /site-packages directory of the Python version in which you installed it so it will disappear when you remove that version of Python.
The .pkg files installed directly into your Applications folder and can be deleted safely like any normal app.
I watched the instructional video here to install cx_Freeze.
https://www.youtube.com/watch?v=J81JFwqsS5o
It seems like the guy runs an executable to do the install. I downloaded the whl file from here.
https://pypi.python.org/pypi/cx_Freeze/5.1.1
I run it this way: pip install some-package.whl
I am using the Anaconda command prompt and Spyder 3.2.4. How can I actually install and/or run cx_Freeze? Thanks.
pip install should work fine. The actual way of testing the library would be to import and see the version.
If you wanted to create an executable using cx_freeze, try the setup script in the following link:
https://cx-freeze.readthedocs.io/en/latest/distutils.html
I have experiencing a problem when installing pywin32 for python 3.5 to my windows 7 PC. The problem is, installation wizard stating that I have no any python versioned as 3.5 in my registery.
My pywin32 file is downloaded from here => pywin32-220.win-amd64-py3.5.exe.
The thing is, when I run python -V code line, I am able to see that I've python 3.5.2 on my PC.
So I don't understand that is the real problem is. Did I get something wrong in logical way?
Any help will be greatly appreciated.
I strongly suggest you delete everything about python on your computer (do not forget to delete related PATH variables) and install Anaconda. You will be able to create several environments and much more.
You can find it in the link below;
https://www.continuum.io/downloads
Export in regedit HKLM\SOFTWARE\Python\PythonCore\3.5-32 and subkeys Replace in an editor "3.5-32" by "3.5" Import the resulting registry file again (by doubleclicking on it).
use "py -m pip install pypiwin32" instead of "py -m pip install pywin32"/"pip install pywin32".
However, I found that pypiwin32 installs version 219. Pywin32's lates version is 221.
I'm sorry, I'm a Python scrub and I just wanted to make sure that I'm installing this library the right way.
I'm trying to get configObj installed for Python 2.7
Should I just browse to the directory the unzip is in and python.exe setup.py? If I do that will it install to the correct place? I know that seems basic but I don't work a lot with python so I just wanted to make sure since this library doesn't appear to have a windows msi. Thanks!
pip install configobj
Tt's the same for Linux versions also, provided you have pip.
Following the link provided by Tibo, I installed this library with pip install configobj. You can get pip on windows, following this post.