The quick install guide for pyOIDC says to run python setup.py install (after installing the prerequisites).
When I try this I get :
RuntimeError: chmod error
'chmod' is not recognized as an internal or external command, operable program or batch file.
Obviously, it looks like it's expecting Linux, but I'm running Windows.
This question (which I needed for one of the prerequisites) has an answer saying:
If you don't already have a C/C++ development environment installed that is compatible with the Visual Studio binaries distributed by Python.org, then you should stick to installing only pure Python packages or packages for which a Windows binary is available.
Well, I don't have a C/C++ development environment installed that is compatible with the Visual Studio binaries distributed by Python.org (at least, I assume I don't, and that I'd know if I did!).
So is there a pure Python package for pyOIDC, or is there a Windows installer, or is pyOIDC just not compatible with Windows?!
Related
I'm trying to install a python package (specifically pandas) into Visual Studio code on a chromebook's linux virtual machine. I've tried many different things but none of them seem to work: trying to use pip install pandas results in bash: pip: command not found. I have no idea where the actual python interpreter is located, so I can't go to the source. I thought it was that I wasn't using the correct terminal, but the only other option is JavaScript Debug Terminal. What am I doing wrong? Is it even possible?
Pip is a python package management tool, which provides the functions of finding, downloading, installing and uninstalling Python packages. However, this tool is not included in the system and needs to be installed manually. Here is the official website of PIP, which contains installation instructions.
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 find out if it is possible to (and how to) install (on windows) the Python library PyOpTools which is for modeling optical systems.
I have tried using Python's PIP function to find and install it but it can't find a module named pyoptools.
If PyOpTools is no longer freely available are there any other open source python libraries for ray tracing that people could recommend?
Many thanks
Installing directly on Windows
The pyOpTools code is still freely available on GitHub (and archived at Google Code).
Here is my failed attempt at installing pyOpTools directly on Windows (but see below for an alternative). Install Python 2.7, then in cmd.exe:
Install Cython, a pyOpTools dependency
python -m pip install cython
Get and install Microsoft Visual C++ Compiler for Python 2.7 from https://www.microsoft.com/en-us/download/details.aspx?id=44266
Download pyOpTools from https://github.com/ramezquitao/pyoptools, using the Download ZIP button to, say, C:\Users\yourusername and unzip. Alternatively, get Git for Windows and clone.
Change into the pyOpTools directory containing setup.py and install pyOpTools
python setup.py install
This fails with "fatal error LNK1120: 1 unresolved externals", but would have worked on Linux (presumably because it uses gcc). There may be a way to fix this but I don't know it. I am guessing pyOpTools is intended to also work on non-Unix systems since there is a comment to that effect in setup.py.
Workaround: Virtual machine
My workaround is to run pyOpTools in a guest Ubuntu VM in VirtualBox and it works like a charm. If I need to access it from the Windows host, I use commands like VBoxManage guestcontrol. For an easy install method see code.google.com/p/pyoptools/wiki/Downloads, which has an Ubuntu ISO all ready to go.
The pyoptools developers were recently successful in installing on Windows, with the help of Cygwin.
For the details see the Windows (using Cygwin) section in https://github.com/cihologramas/pyoptools/blob/master/README.md