I uncompress Embed Python, download pip wheel extract it and put to lib\site-packages. Next run python -m pip install pywin32. So far so god. But when running program it fails to load pywin32file.pyd. With dependency walker I checked and realized it is x86 architecture while running x64 Python. I tried with x64 downloaded version of pywin32 wheel file and got error "Unsupported platform". pip installed x86 wheel but is is not correct.
At the end, I unzipped x64 version of pywin32 wheel into lib\site-packages. Two dlls from pywin32_system32 copied to dll search path and it works now.
We are distributing Embed Python with handful of libraries and pip is god way to get them.
What causes wrong architecture detection by pip and how to solve problem?
The problem you encountered may have had a different cause to my issue, but I was able to resolve a similar problem with pip installing 32-bit packages on 64-bit Python by changing my VSCMD_ARG_TGT_ARCH environment variable from x86 (which seems to be the default setting if you are using the Visual Studio Developer Command Prompt or anything that relies on it) to x86_64.
This seems to be a bug in packaging that was just fixed this April, so, as of this writing, the fix may not have yet made its way into pip.
I am trying to install enaml for the latest Anaconda distribution(4.3.1). The installation guide on http://nucleic.github.io/enaml/docs/get_started/installation.html says:
The sections below describe how to install Enaml and all of its dependencies from scratch, starting with the installation of a Python runtime. The instructions assume that the user’s system has a C++ compiler and the Git command line tools installed and available on the system path.
The Easy Way
If installing and building Enaml and its dependencies from scratch is not appealing, the free (and unaffiliated) Anaconda Python distribution provides a complete Python environment which comes with a reasonably recent version of Enaml and a host of other useful packages.
If you have a working C++ compiler, you can install using pip:
$ pip install enaml
Can you please tell me the easiest way to install a C++ compiler and Git command line tools and make them available on system path?
What I tried:
I tried installing Visual Studio however it turns out to be 32 bit so when pip installing enaml or atom I get the following error:
Failed building wheel for atom
fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
Install the Microsoft Visual C++ Compiler for Python 2.7 and run pip install enaml again. There's also a tutorial here Python GUI's with enaml that shows how to get started from scratch.
conda install enaml is the more idiomatic way to install packages in anaconda than pip install, at least for packages it knows about. Enaml and Atom are among this list.
This bypasses C++ compilation so it may not be what you want, but it is the easiest way to install Enaml. (I have a black thumb when it comes to building from source, so Anaconda works very well for me.)
I have read through
How to install Theano on Anaconda Python 2.7 x64 on Windows?
I installed Anaconda 2 and followed the steps and I can import theano, however once in a while I get a windows crash message window on python crash similar to this:
python.exe crashes when importing `theano`
I have done "conda install mingw libpython" step.
Also when I run theano.test() I get this warning:
pycuda import failed in theano.misc.pycuda_init.
Overall I think there were some more steps in the windows installation page regarding visual studio, and other modules. I have visual studio 2012 installed by microsoft.
Did you follow the theano install instructions fully?
On windows 7 x64, I would advise to either use Canopy from Enthought, which, if you are a student , you can get the complete package for free.
Or, i also used WinPython before, it worked fine.
Although you have to follow all steps, including :
Installing Windows Software Development Kit version 7.1 or you can install the newest Visual Studio which comes with it and it comes with an option to install Microsoft Visual C++ Compiler for Python 2.7
Installing TDM GCC
But be sure to check
http://deeplearning.net/software/theano/install_windows.html
You might wanna check if you missed any steps.
I had problems with Anaconda and Theano before. So i gave up on using it.
However a friend had success with it and Theano as well.
Just be sure you have your environment and python setup installed properly prior to theano install.
Doing
where gcc
where gendef
where cl
where nvcc
on the Command Prompt Might reveal something...
Be sure to have installed Windows SDK and last visual studio.
I am trying to install the boost library as shown here (see section install Boost from Shayne Fletcher:
http://www.amazon.com/review/R2QLTSQPKTFW5Z/ref=cm_cr_pr_cmt?ie=UTF8&ASIN=0470987847#wasThisHelpful
However I already have installed the 64 bit version of Anaconda for Python 2.7.5. So when I follow the instructions above I get the similar linking errors to the OP experienced in the post below:
Cannot successfully install Boost.Python
The OP resolved the issue be removing the 64 bit version and replacing it with the 32 bit version.
However I wondered if I could install both versions and switch between them, it seems that generally speaking you can:
Anaconda Python 32-bit is trying to load Anaconda 64-bit libraries
to-load-anaconda-64-bit-libraries
However that sill leaves the question of how the boost library will know how to use the correct version and where to find it?
Or in my case would I still be better off removing the 64 bit version completely and installing the 32 bit version in its place?
I am doing the build in visual studio 2008.
If you install the 32-bit version of Anaconda, you can conda install boost.
As for how to switch between them, you will need to modify your PATH environment variable.
If you are using 64-bit version.
Open Anaconda prompt in Admin mode and run the following command
conda install -c anaconda boost
It will automatically resolve environment
I found out that it's impossible to install NumPy/SciPy via installers on Windows 64-bit, that's only possible on 32-bit. Because I need more memory than a 32-bit installation gives me, I need the 64-bit version of everything.
I tried to install everything via Pip and most things worked. But when I came to SciPy, it complained about missing a Fortran compiler. So I installed Fortran via MinGW/MSYS. But you can't install SciPy right away after that, you need to reinstall NumPy. So I tried that, but now it doesn't work anymore via Pip nor via easy_install. Both give these errors:
There are a lot of errors about LNK2019 and LNK1120,.
I get a lot of errors in the range of C: C2065,C2054,C2085,C2143`, etc. They belong together I believe.
There is no Fortran linker found, but I have no idea how to install that, can't find anything on it.
And many more errors which are already out of the visible part of my cmd-windows...
The fatal error is about LNK1120:
build\lib.win-amd64-2.7\numpy\linalg\lapack_lite.pyd : fatal error LNK1120: 7 unresolved externals
error: Setup script exited with error: Command "C:\Users\me\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\BLAS /LIBPATH:C:\Python27\libs /LIBPATH:C:\Python27\PCbuild\amd64 /LIBPATH:build\temp.win-amd64-2.7 lapack.lib blas.lib /EXPORT:initlapack_lite build\temp.win-amd64-2.7\Release\numpy\linalg\lapack_litemodule.obj /OUT:build\lib.win-amd64-2.7\numpy\linalg\lapack_lite.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\numpy\linalg\lapack_lite.lib /MANIFESTFILE:build\temp.win-amd64-2.7\Release\numpy\linalg\lapack_lite.pyd.manifest" failed with exit status 1120
What is the correct way to install the 64-bit versions NumPy and SciPy on a 64-bit Windows machine? Did I miss anything? Do I need to specify something somewhere? There is no information for Windows on these problems that I can find, only for Linux or Mac OS X, but they don't help me as I can't use their commands.
You can install scipy and numpy using their wheels.
First install wheel package if it's already not there...
pip install wheel
Just select the package you want from http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
Example: if you're running python3.5 32 bit on Windows choose scipy-0.18.1-cp35-cp35m-win_amd64.whl then it will automatically download.
Then go to the command line and change the directory to the downloads folder and install the above wheel using pip.
Example:
cd C:\Users\[user]\Downloads
pip install scipy-0.18.1-cp35-cp35m-win_amd64.whl
EDIT: The Numpy project now provides pre-compiled packages in the wheel format (package format enabling compiled code as binary in packages), so the installation is now as easy as with other packages.
Numpy (as also some other packages like Scipy, Pandas etc.) includes lot's of C-, Cython, and Fortran code that needs to be compiled properly, before you can use it. This is, btw, also the reason why these Python-packages provide such fast Linear Algebra.
To get precompiled packages for Windows, have a look at Gohlke's Unofficial Windows Binaries or use a distribution like Winpython (just works) or Anaconda (more complex) which provide an entire preconfigured environment with lots of packages from the scientific python stack.
Installing with pip
You can install the numpy and scipy wheels on Windows with pip in one step if you use the appropriate link from Gohlke's Unofficial Windows Binaries (mentioned by sebix) and run the Windows command prompt as Administrator. For example, in Python 3.5, you would simply use something like this:
# numpy-1.9.3+mkl for Python 3.5 on Win AMD64
pip3.5 install http://www.lfd.uci.edu/~gohlke/pythonlibs/xmshzit7/numpy-1.9.3+mkl-cp35-none-win_amd64.whl
# scipy-0.16.1 for Python 3.5 on Win AMD64
pip3.5 install http://www.lfd.uci.edu/~gohlke/pythonlibs/xmshzit7/scipy-0.16.1-cp35-none-win_amd64.whl
Best solution for this is to download and install VCforPython2.7 from https://www.microsoft.com/en-us/download/details.aspx?id=44266
Then try pip install numpy
Downloading the binaries for 64-bit from http://www.lfd.uci.edu/~gohlke/pythonlibs/, and installing it directly with pip in this order:
pip install numpy-1.12.0+mkl-cp36-cp36m-win64.whl
pip install scipy-0.18.1-cp36-cp36m-win64.whl
pip install matplotlib-2.0.0-cp36-cp36m-win64.whl
Note that you must place command prompt in the folder where you put the .whl files after downloading them, and you must run it as administrator,
worked for me on Windows 10 64-bit now python is up and running.
You can now pip install numpy on Windows!
"Note: this page has only historical relevance, you can now pip-install for windows"
Source: https://github.com/numpy/numpy/wiki/Whats-with-Windows-builds
Intel provides pre-compiled Python modules for free in their "Intel Distribution for Python". The modules are compiled against Intel's MKL (Math Kernel Library) and thus optimized for faster performance. The package includes NumPy, SciPy, scikit-learn, pandas, matplotlib, Numba, tbb, pyDAAL, Jupyter, and others. Find more information and the download link here
If you are on windows , you wouldn't need wheel anyway! You can directly install package by downloading the 32-bit package as win32 from this link [http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy] and then move that downloaded package to cmd's current directory and open cmd and write following codepip install numpy-1.13.1+mkl-cp36-cp36m-win32.whl then do it same for scipy
For 64-bit you need to install mingw-w64 as it is gcc and compiles numpy and scipy as precompiled status.
Currently it works fine with 32-bit.So I had opted for win32 package both for numpy+mkl and scipy in that link.
Hope This works! Give a try
You can download the needed packages from here and use pip install "Abc.whl" from the directory where you have downloaded the file.
Look into python wheels to solve your problem. The best part of python wheels is that they let you install C extensions with no compilers. I just installed numpy and scipy using pip in a clean python install and they both worked fine.
for python 3.6, the following worked for me
launch cmd.exe as administrator
pip install numpy-1.13.0+mkl-cp36-cp36m-win32
pip install scipy-0.19.1-cp36-cp36m-win32
Package version are very important.
I found some stable combination that works on my Windows10 64 bit machine:
pip install numpy-1.12.0+mkl-cp36-cp36m-win64.whl
pip install scipy-0.18.1-cp36-cp36m-win64.whl
pip install matplotlib-2.0.0-cp36-cp36m-win64.whl
Source.
Hey I had the same issue.
You can find all the packages in the link below:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-learn
And choose the package you need for your version of windows and python.
You have to download the file with whl extension. After that, you will copy the file into your python directory then run the following command:
py -3.6 -m pip install matplotlib-2.1.0-cp36-cp36m-win_amd64.whl
Here is an example when I wanted to install matplolib for my python 3.6 https://www.youtube.com/watch?v=MzV4N4XUvYc
and this is the video I followed.
Follow these steps:
Open CMD as administrator
Enter this command : cd..
cd..
cd Program Files\Python38\Scripts
Download the package you want and put it in Python38\Scripts folder.
pip install packagename.whl
Done
You can write your python version instead of "38"