I am trying to import the PyInstaller module in myscript.py, It work well as py extension but it doesn't work when I compile it with PyInstaller.
from PyInstaller.__main__ import run
And I have this message when I execute myscript.exe :
PyInstaller cannot check for assembly depencies. Please install PyWin32 or pywin32-ctypes.
pip install pypiwin32
I looked and I have already this module "pypiwin32". I searched everywhere before to post my request here. Any help is welcome, thanks !
Make sure you are using the python you are installing to. The best way is to cmd to the pip python dir and run install from there.
Other option is to use Anaconda. It will install to the right one.
If you have few pythons on your computer the "pip install" will choose the first one he see's in PATH.
Related
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
I am having a nightmare tonight, I want to start learning some Django but I am running into quite a few problems while installing it.
I am following these tutorials - https://www.youtube.com/watch?v=UmljXZIypDc / https://www.youtube.com/watch?v=MEcWRk9w0t0
I installed Python 3.7.2 and confirmed the installation by typing 'python --version' into Terminal/Command Prompt.
I typed 'pip --version' into CMD and got this message in return "'pip' is not recognized as an internal or external command, operable program or batch file."
this is where I am stuck, I cannot continue any longer without completing this step, could anyone tell me where I am going wrong?
Thank you
edit: looks like it's a path issue, does anyone know how to do the following: how to I do this :
"Then add C:\Python37\Scripts path to your environment variable. Assumes that there is a Python37 folder in your C drive, that folder name may varied according to the installed python version Now you can install python packages by running pip install awesome_package_name"
You need to uninstall python and when you're installing python again , check on add python to PATH.It will remove the error
Can you be more specific as to which OS you are using? You can use pip also like python -m pip .... The -m part loads a python module It might just not be installed since it is a python module. On linux, for example you have to install pip separately (would be sudo apt-get install python-pip).
Run pip install django from windows command prompt instead of python shell.
Installing Django with pip
follow these to know more. https://docs.djangoproject.com/en/2.2/topics/install/
hope you will get it.
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 am using Python 2.7.11 and am trying to pip install modules however a few of them are failing. The message I get is "Failure to build wheel for 'X'" and "Error: INCLUDE Environment Variable is empty".
I tried to install Scrapy, LXML and Twisted and those failed. Some other random modules I tried installed fine.
I have installed pyOpenSSL, added python27 and python27/scripts to environment.
Thanks,
I tried both the solutions offered, none worked.
I installed Microsoft Visual C++ Compiler for Python 2.7, download it here. Then run:
pip install scrapy
That worked for me
A quick solution is to install the pre-compiled version of lxml. You can find it here. If you use the .exe you can point it directly to your python root folder.
After that:
close and re-open cmd
pip install your_package (make sure cmd is in the correct directory)
enjoy having no frustrating lxml errors!
Hope this helped.
Use a pre built library from this link if you are on windows:
https://www.lfd.uci.edu/~gohlke/pythonlibs/
Choose the relevant library given python version and desktop config. For example
I want to install apell in python 3.6 and winamd64 then download this:
aspell_python-1.15-cp36-cp36m-win_amd64.whl
Now go to your console and type
pip install path-to-.whl
and that's it.
So I'm following the 'Think Python' PDF guide and this is my first real hurdle. I tried to follow a guide to install it but it's completely over my head. I know this is vague but if anyone could guide me through it like I'm a pensioner I'd be grateful.
I'm currently using Python 2.7.6. I think I downloaded setup tools and PIP but I can't be too sure.
Sorry for the openness and vagueness of this question but I'm quite stuck.
Edit: Since you're on Windows, I suggest you download and run this installer for Pip.
Once that's done, if you've downloaded and installed Pip correctly, all you should have to do is open a terminal, type pip install swampy, and press return.
In order to test if you've installed Swampy correctly, do the following:
Open a command prompt.
Type python and press return
Type from TurtleWorld import * and press return.
If you've installed Swampy correctly, you shouldn't see any error messages. If you see something like this ImportError: No module named TurtleWorld, Swampy isn't installed correctly yet.
References:
This answer on installing Pip on Windows.
This answer on
installing Swampy on Windows.
This page on setting up Swampy
from an intro CS course at UCSB.
Download Swampy package tar.gz, extract it:
$ tar -zxvf [swampy-package-name]
cd to Swampy folder, in command line, you type:
$ sudo python setup.py install
run python
$ python
from Swampy.TurtleWorld import *
or run follow example of think python
$ python polygon.py
It work by python. some other python version doesn't work.