I cannot figure out how to install pyopencl with Cygwin. Never used Cygwin before so I am very lost as to how I initiate python and use it to run my .py setup files.
You said, you want to install pyopencl without cygwin on windows, right?
There we go:
In case of you need 32-Bit version, download win32 Packages.
Download Python 2.7.5 Windows X86-64 Installer from http://www.python.org/download/ and install python (you rather install it in C:\Python27)
Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/
Download numpy, scipy, pyopencl and install them
Go to pypi.python.org/pypi/pytools and download pytools.
Extract the file (using i.e. WinRAR) or tar (tar cxvf my.tar.gz)
Open commandline aka Dos (cmd.exe) and go in cmd to the folder you have extracted pytools by using cd command
Enter in cmd: python setup.py install
Open Python IDLE or simply type python in cmd and type import pyopencl
There should be no errors. If so, you did well.
Did you install Python into Cygwin?
If not, launch setup.exe, get to the packages screen, and do a search for python.
You can install 2.6.8 and 3 side by side if you want.
After that it's like using python anywhere else. You can do a $ python my.py to run my.py. You can install easy_install or pip, etc. if they'll help. Otherwise, follow the directions for PyOpenCL and you should be good!
Related
My download install of Python 3.8.2-amd64 is stored in:
C:\Username\AppData\Local\PackageCache\{13ee6ab9-4dca-406c-bc3b-5d86391d39a1}
Why is it stored in PackageCache rather than \Python\Python38?
I can execute py at the command line, but neither pip command nor pip --version are recognized, so I can't install pandas, numpy, etc.
When I try to download get-pip.py I get error message no such site.
It depends if you have customized the installation when you installed Python on your computer. If you do, it will be installed in C:\Program Files but if you don't, it is installed in your Windows profile so you don't need to have administrative rights to install it.
You can find a little bit more on this subject on the Python documentation site
I have been trying to install paramiko module on windows without success. I have been getting errors related to Visual C++ compiler missing. Is it possible to install paramiko without having to go through compile process.
Based on the method from this question this is what I would suggest (assuming you already have >=python-2.7.9 installed, if not, upgrade, 2.7.9 comes with pip, pre 2.7.9 doesn't):
Get the appropriate pycrypto whl file (based on python version and win32/win_amd64). I've found some available here (can't vouch for the site as I don't use python on windows much).
Run pip install pycrypto-stuff.whl (in a command prompt window in the directory where you've saved the pycrypto whl file).
Run pip install paramiko (in a command prompt, but can be in w/e folder you like).
That should do the trick. In general a simple pip install package_name would work, but pycrypto does not provide a wheel file (binary package), therefore you have to build it. By the sound of it you don't have Visual C++ installed (or not the right version, it only works for one, I don't recall which), pycrypto needs an extension package built to use the system crypto libraries, which is why the source package isn't working.
I was able to get it working by installing the following packages using pip.
pip install bcrypt cryptography pynacl paramiko
These were the packages my Linux install used as prerequisites, so they should work on windows as well.
I've downloaded python libraries (tar.gz) from external links. How to use these libraries, I mean in which directory under the python should I unzip such libraries.
How to use downloaded libraries with python when we are using:
windows 7
Ubuntu
Also how to install these libraries without using pip in Linux? Do we have to set path in windows7 to use the libraries?
Guys better to post comments then to give negative points. With your suggestion I can modify my post. I dont think you to be smart guy by rating negative points in any comments.
For Linux based systems (e.g., Ubuntu):
$ tar xzf package.tar.gz
$ cd package
$ python setup.py install
Also, look input pip https://pypi.python.org/pypi/pip
On Windows and Linux, all you need to do is unzip the archive somewhere, cd into and run the following command as administrator (usually by running cmd.exe as Administrator on Windows or by using sudo on Linux):
python setup.py install
If the package does not have a setup.py, it can get tricky. Most of the time the package just needs to be copied into your Python's site-packages folder.
You will find some packages that need to be built. On Linux, you can usually do this pretty easily. On Windows, you will need the appropriate compiler, usually a free version of Visual Studio will do, although you have to make sure you get the correct version of Visual Studio. I've heard reports that you can also use MingW.
I'm really new to coding, programming, Python, and just computers in general, so I need some help with Canopy. I've been having pretty consistent troubles installing any packages to Canopy; some stuff is in the internal package manager,but whenever it isn't, it's really confusing. I guess I'll list a specific installation.
I'm trying to install "pywcs" (link provided below) to my Win7 64-bit machine. I have Cygwin if that helps at all. I do not know how to go about this; the stuff I found online is pretty confusing, and Cygwin easy_install (filename) never seems to work. Any step-by-step solutions?
The way I installed astropy is as follows.
Open Windows Terminal
Change Directory to C:\Users\<USER NAME>\AppData\Local\Enthought\Canopy32\User\Scripts
Type easy_install.exe astropy
Wait until the download completes, and restart Enthought.
sometimes installing packages can be hard for enthought canopy . You could install all python packages using pip install mrjob command on the its own canopy command prompt
Go to tools tab on the canopy editor ,
Left click on the canopy command prompt ,
Finally pip install <package name> and hit Enter key
The key point is that in order to install a package into any Python distribution (including Canopy Python), you should use that Python to perform the installation. You refer to Cygwin's "easy_install", but you should instead use Canopy's easy_install.
As described in this article, the easiest way to be sure that you are running Canopy's Python (and Canopy's easy_install) is to have Canopy Python on your PATH. This is done by default during Canopy installation, but if you uncheck this option then, or if your Cygwin installation doesn't use your Windows PATH, then you will need to adjust your Cygwin PATH accordingly.
Doing as Sukrit suggests, and running the installation from the Canopy Python Scripts directory, is also a reasonable approach.
Alternatively, depending on its compiler dependencies, you may be able to install astropy from a Windows Command Prompt rather than from Cygwin (of course Canopy must be on the PATH here too, as it would be by default.)
In Linux you can do it as follows.
1) Make sure you are using the Canopy version of Python - check out https://support.enthought.com/entries/23389761-Installing-packages-into-Canopy-User-Python-from-the-command-line
2) At the command prompt use easy_install, for example:
$ easy_install pp==1.5.7
to install version 1.5.7 of pp
Just for information, Astropy is now included by default in Enthought Canopy:
https://www.enthought.com/products/canopy/package-index/
I have Windows Vista and am running Python 2.7. I am having trouble installing some Python libraries including, NumPy, SciPy, and pygame. I am currently trying to copy the NumPy file straight to my computer (C:\numpy) and then unziping the file there. In a command prompt I then run the code;
cd c:\numpy
python setup.py config
python setup.py install
When I get to the "python setup.py config" part, the command prompt says "this is the wrong setup.py file to run"
Any suggestions?
This is the ANSWER for installing numpy on Windows 8 64 bit.
All you need is:
1.Python, installed in your system, in my case its c:\Python27, its 2.7 version.
2.Install pip if not available.
download "numpy-1.9.2+mkl-cp27-none-win_amd64.whl" file for 64 bit, you can find this here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
if you don't find it there use mine at: https://github.com/pawanputtaswamy/Libs
How to install:
1.open command prompt (Windows + r and type cmd)
2.Go to pip directory, in my case (cd c:\Python27\Scripts\pip.exe)
3.Run the following command: pip.exe install \numpy-1.9.2+mkl-cp27-none-win_amd64.whl
Done
Numpy, Scypy and pygame all have windows installers; You are advised to use these installers in favor of archive versions. Make sure you match the version (3.2, 2.7) and archetecture (i386 or x86_64) as the python binary you have installed.
Alternatively, depending on your time constraints and situation you could use Enthought's prepackaged python distribution for Windows. The free version:
http://www.enthought.com/products/epd_free.php
has everything you need except pygame which you should be able to install with easy_install once everything else is in place.
Open the Python shell and input as such:
>>> import pip
>>> pip.main(["install","numpy"])
In fact,the method of installing numpy is very easy and quick.First,make sure that Python has already been installed.Then,download the numpy module on sites,such as
http://sourceforge.net/projects/numpy/files/NumPy/, which provides the numpy module for python2.6.
Finally,double click the module,the rest you have to do is just let it go on.and,it will be installed naturally.
Just go here http://continuum.io/downloads and download the graphical installer.
It will install Numpy, Scipy and a tonne of other useful stuff.
This is a screenshot that can help, Note that I use Ubuntu as operating System