Installing configobj for python 2.7 - python

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.

Related

Converting a Python file into a desktop application

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

Failure to build wheel / "Error: INCLUDE Environment Variable is empty"

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.

unable to use pip for installing python packages

I have just installed python 3.4, including pip, on a win64 machine.
When trying to use pip to install a package, I encounter a strange error.
I'm running:
pip install packagename
and get:
Can't locate pip.pm in #INC...
This looks like a perl error to me. I do have perl installed on my machine, but why is windows trying to invoke perl?
Waiting for your advice,
Thanks!
I think you have installed pip perl module, and it added the pip perl tool in your PATH variable (in upper place than pip from python). So, if you don't use that perl module, you can delete it, or call the python pip tool with the complete path
OK, so what did it for me was changing the name of the pip file found somewhere on my drive to pip_pm. This convinced windows to just use the python pip command. Thanks for your help anyway.

How to install easy_install in Python 2.7.1 on Windows 7

I have installed Python 2.7.1 on Windows 7, but I am unable to install easy_install.
Please help me.
I usually just run ez_setup.py. IIRC, that works fine, at least with UAC off.
It also creates an easy_install executable in your Python\scripts subdirectory, which should be in your PATH.
UPDATE: I highly recommend not to bother with easy_install anymore! Jump right to pip, it's better in every regard!
Installation is just as simple: from the installation instructions page, you can download get-pip.py and run it. Works just like the ez_setup.py mentioned above.
for 32-bit Python, the installer is here. after you run the installer, you will have easy_install.exe in your \Python27\Scripts directory
if you are looking for 64-bit installers, this is an excellent resource:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
the author has installers for both Setuptools and Distribute. Either one will give you easy_install.exe
Look for the official 2.7 setuptools installer (which contains easy_install). You only need to install from sources for windows 64 bits.
That tool is part of the setuptools (now called Distribute) package. Install Distribute. Of course you'll have to fetch that one manually.
http://pypi.python.org/pypi/distribute#installation-instructions
I recently used ez_setup.py as well and I did a tutorial on how to install it. The tutorial has snapshots and simple to follow. You can find it below:
Installing easy_install Using ez_setup.py
I hope you find this helpful.
The recommended way to install setuptools on Windows is to download ez_setup.py and run it. The script will download the appropriate .egg file and install it for you.
For best results, uninstall previous versions FIRST (see Uninstalling).
Once installation is complete, you will find an easy_install.exe program in your Python Scripts subdirectory. For simple invocation and best results, add this directory to your PATH environment variable, if it is not already present.
more details : https://pypi.python.org/pypi/setuptools
I know this isn't a direct answer to your question but it does offer one solution to your problem. Python 2.7.9 includes PIP and SetupTools, if you update to this version you will have one solution to your problem.

How to install pywin32 module in windows 7 [duplicate]

This question already has answers here:
ImportError: no module named win32api
(15 answers)
Closed 3 years ago.
I am trying to install pywin32. I downloaded it from sourceforge.net. When I run
setup.py install
it shows "Unable to find vcvarsall.bat". I Googled about it and found that I have to install MinGW and set path then run
python setup.py build --compiler=mingw32
but it's showing
Can't find a version in Windows.h
Can anybody help? (I have a trial version of Visual Studio 2010 Ultimate installed and MinGW C and C++ compiler installed. Operating system: Windows 7.)
Can anybody tell me a source from where I can download Python binaries already compiled in MinGW, so I don't have to do all this. Or if I can get a python which already have Windows modules.
You can install pywin32 wheel packages from PYPI with PIP by pointing to this package: https://pypi.python.org/pypi/pypiwin32 No need to worry about first downloading the package, just use pip:
pip install pypiwin32
Currently I think this is "the easiest" way to get in working.
are you just trying to install it, or are you looking to build from source?
If you just need to install, the easiest way is to use the MSI installers provided here:
http://sourceforge.net/projects/pywin32/files/pywin32/
(for updated versions)
make sure you get the correct version (matches Python version, 32bit/64bit, etc)
I disagree with the accepted answer being "the easiest", particularly if you want to use virtualenv.
You can use the Unofficial Windows Binaries instead. Download the appropriate wheel from there, and install it with pip:
pip install pywin32-219-cp27-none-win32.whl
(Make sure you pick the one for the right version and bitness of Python).
You might be able to get the URL and install it via pip without downloading it first, but they're made it a bit harder to just grab the URL. Probably better to download it and host it somewhere yourself.
I had the exact same problem. The problem was that Anaconda had not registered Python in the windows registry.
1) pip install pywin
2) execute this script to register Python in the windows registry
3) download the appropriate package form Corey Goldberg's answer and python will be detected
Quoting the README at https://github.com/mhammond/pywin32:
By far the easiest way to use pywin32 is to grab binaries from the most recent release
Just download the installer for your version of Python from https://github.com/mhammond/pywin32/releases and run it, and you're done.

Categories