Having a nightmare here, been trying for hours with no luck. I'm using anaconda with a virtual environment on python 3.4 (I want to use geopandas, can't use 3.5) on windows 10. This is superset by the way: https://github.com/airbnb/superset
I also tried in my root conda environment but same issues.
First I do
activate py34
Then I tried two methods, A)
pip install superset
gives the error message
error: Microsoft visual c++ 10.0 is required. get it with "microsoft windows sdk 7.1" python
and B)
Download the source files and go to the directory and
setup.py install
Produces a different output but the same error message.
So I tried installing the SDK as suggested (standard UI installation like a normal windows program), but then I get an error with no code or information provided:
Installation of the "Microsoft Windows SDK for Windows 7" product has reported the following error: Please refer to Samples\Setup\HTML\ConfigDetails.htm document for further information"
There is no error code provided and I also don't know where that ConfigDetails.htm file is.
I tried installing a more recent SDK found here but still the same problems: https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk
Any ideas? I'm relatively new to python and find packages the most difficult thing ever, so if the answer is obvious then sorry.
Migrating OP's solution from a comment to an answer:
In the end the best solution was to install Cygwin and install Superset within Linux.
AndyMoore - Mar 2, 2017 at 20:50
Related
Description
When I tried to install package sacrebleu, I got an error like this:
Installation Error
It said "System cannot find the specified file". However I have no idea how to solve it.
I have tried installing package mecab-python3. But it confuses me that it was successfully installed in Anaconda but got an error, "Microsoft Visual C++ 14.0 is required", in original python38 environment.
Whether the package mecab-python3 has been installed or not, I still got the same error and cannot install sacrebleu.
I also tried restarting my machine but it does not work.
Is there anyone could solve it? or I want to know if there is any alternative package I can use to calculate BLEU score.
Thanks Anyway!
My Environment
Windows 10
Python 3.8
pip 20.1.1
Anaconda3 v4.8.2
I'm the mecab-python3 maintainer. Sorry it's giving you trouble.
The README has a link to the C++ runtime pack you have to install on Windows, if you install that it should work.
I have heard reports of the package not working with Anaconda on Windows specifically, though it seems to work sometimes. If you have trouble please open an issue and I'll try to fix it. On the other hand, if you aren't processing Japanese there's no reason to import the module and that may be a bug in sacrebleu.
Ah, actually, I just saw your screenshot - didn't notice it before.
Versions before 1.0 don't support Windows. But to keep using the old dictionary, sacrebleu has to make some changes, so they don't support 1.0+ yet. I think they are working on it, see this issue.
Is there now an easy protocol to build a .exe from python 3.5+, using modules pyqtgraph, qt5, theano, pymc3, numpy, scipy, os and sys, and opening a simple GUI stored in a '.ui' file ? I lost hours and eventually failed to make one (for w7-64 bits). Help !
preliminary failure with py2exe: I first install py2exe for python 3 but it turns out this is not compatible with my python 3.6 yet, so I downgraded to python 3.5… to get a bunch of errors. Then I went to forums and tried the proposed cures but failed (I’m uneasy with windows), the alternative being to downgrade to python 3.4… So I downgraded to python 3.4 to get an error concerning a missing ‘msvcr100.dll’ that I tried to install following instructions on forums but by default I don’t have the permission to modify system directories… When I eventually had this permission it turns out the ‘regsvr32’ command fails (isn’t this for 32 bits ? but there is no ‘regsvr64’…). Following episodes are described below.
update august 23, 2017, 1pm:
I also tried pyinstaller as advised but it failed (see my related question build a .exe for Windows from a python 3 script importing theano with pyinstaller)
I also tried cx_freeze but it failed (see my related question build a .exe for Windows from a python 3 script)
I also tried pynsist but it fails (same link than above)
what's next ?
update september, 2, 2pm:
I eventually managed to build a .exe with pyinstaller after many episodes.
Unfortunately I failed to deal with the ‘theano’ module (that is required in my case by the ‘pymc3’ module) and I had to modify the .py files and give up part of the application. Could anyone help me building a .exe for windows 7+, with the ‘theano’ module ?
see build a .exe for Windows from a python 3 script importing theano with pyinstaller
Pyinstaller Works with Python 3.5 and it is working even for packages like tensor-flow, scipy , etc (The packages I worked with)
py -3.5 pip install pyinstaller
then go the C:\Users\user\AppData\Local\Programs\Python\Python35\Scripts
and run the command
pyinstaller <code .py file along with directory> --onefile
--onefile : is for compressing the build and get a single file as output
I would suggest pyinstaller see http://www.pyinstaller.org/
The pyinstaller already supports 3.5
The development version supports 3.6
It is better to use spec file to import other hidden libraries. I listed all Sklearn libraries and add them to spec file as a hiddenimports, you can add libraries you used in your project.
I am trying to install python through cygwin on a windows machine in order to make use of a statistical program that can only be implemented using python in a linux environment.
I have run setup-x86_64.exe and installed all python related cygwin packages in an attempt to install python, but when I open a terminal and type python I just get
$ python
-bash: python: command not found
which is the same for all python commands I try so clearly the installation has not occurred. However, I have found a path to Python-2.7.9 which appears to contain the files required to build python from source.
When I run ./configure it is successful, but when I then input make it fails due to:
File "build/temp.cygwin-1.7.35-x86_64-2.7/libffi/fficonfig.py", line 33, in <module>
ffi_sources += ffi_platforms['X86_WIN64']
KeyError: 'X86_WIN64'
Makefile:488: recipe for target 'sharedmods' failed
make: *** [sharedmods] Error 1
Anyone know why make won't work?
The options in ./configure --help are unfamiliar to me, could any of these options allow for successful installation?
Any ideas would be greatly appreciated, thank you.
Cygwin comes with an installer, called setup.exe or setup-x86_64.exe. Just run it and type python to the search box. Then let it install it for you.
python language interpreter is the basic package you need.
So, this question is 3 years old, but this error still happens with most recent versions of Python 2 (tested with 2.7.13 and 2.7.15)
I was able to get python to build by modifying the following file in the build directory.
--- build/temp.cygwin-2.11.1-x86_64-2.7/libffi/fficonfig.py~ 2018-11-03 14:51:53.290000000 -0400
+++ build/temp.cygwin-2.11.1-x86_64-2.7/libffi/fficonfig.py 2018-11-03 14:53:41.793000000 -0400
## -9,6 +9,7 ##
'X86': ['src/x86/ffi.c', 'src/x86/sysv.S', 'src/x86/win32.S'],
'X86_FREEBSD': ['src/x86/ffi.c', 'src/x86/freebsd.S'],
'X86_WIN32': ['src/x86/ffi.c', 'src/x86/win32.S'],
+ 'X86_WIN64': ['src/x86/ffi.c', 'src/x86/win64.S'],
'SPARC': ['src/sparc/ffi.c', 'src/sparc/v8.S', 'src/sparc/v9.S'],
'ALPHA': ['src/alpha/ffi.c', 'src/alpha/osf.S'],
'IA64': ['src/ia64/ffi.c', 'src/ia64/unix.S'],
The source files, in particular src/x86/win64.S, are present in the source tree. For some reason, ./configure does not seem to be properly adding the option to the dictionary in the fficonfig.py file, which causes the KeyError posted in the question. After making this modification, make and make install completed successfully and I was able to install an alternate version of python in addition to the normal Cygwin package.
I'm not yet sure why this happens, but I thought I would attempt to provide a solution to the question actually asked rather than just telling the asker to install a pre-compiled version using the package manager.
Since building Python from source was said to be a bad idea, I assumed my Cygwin was broken. I attempted to uninstall Cygwin following the instructions on the Cygwin website, but I was unable to remove it due to permission difficulties (I use a university-supplied Windows machine). My last resort was to run the Cygwin installation wizard setup-x86_64.exe and uninstall all packages, then run the wizard once more and select the necessary packages again as if starting from new. Miraculously, installing the required packages from scratch solved the problem and I am now running Python through my Cygwin terminal with no errors.
If you want to run Python on Cygwin, you might need to build it from source.
download the source
unpack it to the directory you could delete later, eg: build
run Cygwin, type: cd /path/to/build
run ./configure --help and read the help about the options you'll need
./configure #options
make
When attempting to install the scikit-bio toolkit via pip on Windows XP using Python 2.78 and Visual C++ 2008 Express Edition, the process is interrupted with the following message issued by VC:
cl : Command line error D8021 : invalid numeric argument '/Wno-error=declaration
-after-statement'
Concerning this error, Microsoft Developer Network website just says:
invalid numeric argument 'number'
A number greater than 65,534 was specified as a numeric argument.
I did not (yet) attempted to install scikit-bio under Linux (Ubuntu 12.04 Precise), but I am under the impression that it will work fine (as everything goes as regards Linux).
Has anyone ever succeeded installing scikit-bio under Windows (XP, 7, 8)? Any hints?
Thanks in advance!
I've installed Anaconda's Python (3.5) on a Windows 10 machine. As you should know, there is no official version of scikit-bio for this platform, but you can install it with this workaround:
Download the latest source from the Scikit-bio Github repository.
Using a tool like 7-zip, unzip it at your home directory.
Open a command line client and change to the source's directory
cd %HOMEPATH%\scikit-bio-master
Using Notepad++ edit the file setup.py
"C:\Program Files (x86)\Notepad++\notepad++" setup.py
Look for the line where the ssw_extra_compile_args variable is defined and change it. You can comment the previous version and redefine the variable in a new line:
#ssw_extra_compile_args = ['-Wno-error=declaration-after-statement']
ssw_extra_compile_args = []
Save the changes, close the editor and run the installation with this command:
python setup.py install
Hopefully you won't receive any error messages. Open an Anaconda's Python session (using the command python) and test if Scikit-Bio was installed rightly using print(skbio.art).
By the way, I've previously installed Visual Studio 2015 Community Edition with C++ SDK features enabled, in order to meet the compiler requirements for the package (Scikit-Bio) installation.
At this time, scikit-bio doesn't officially support windows. We'd definitely be interested in hearing about people's efforts to install, test, and use scikit-bio on Windows, but we don't have developers with expertise in this area.
This is related to biocore/skbio#941.
When running python26 under windows OS (64bits).....
I have got errors like:
import win32api" error in Python 2.6: pywintypes26.dll
or
pythoncom26.dll missing
ImportError: DLL load failed: The specified module could not be found.
I have done the msi installation for python26
all dlls can be found under C:\Python26\Lib\site-packages\pywin32_system32
After I copy pywintypes26.dll and pythoncom26.dll from C:\Python26\Lib\site-packages\pywin32_system32 to C:\Python26\Lib\site-packages\win32 -> Solve the problem!
I also hit a problem importing win32api.
The post-install script for pywin32 failed, which should copy pythoncom26.dll, pythoncomloader26.dll, and pywintypes26.dll, among other things. I ran it by hand and my installation was fixed.
python scripts\pywin32_postinstall.py -install
I had a similar problem when installing under 64 bit Python 3.4.2. I ran the install executable pywin32‑219.win‑amd64‑py3.4.exe from http://www.lfd.uci.edu/~gohlke/pythonlibs/ .
On the site it states clearly:
"Python 3.4 users must manually run python.exe Scripts\pywin32_postinstall.py -install from an elevated command prompt."
which I did not do first time round; I installed from a normal prompt getting the following feedback:
c:\python34>python.exe Scripts\pywin32_postinstall.py -install
Copied pythoncom34.dll to C:\Python34\pythoncom34.dll
Copied pywintypes34.dll to C:\Python34\pywintypes34.dll
You do not have the permissions to install COM objects.
The sample COM objects were not registered.
etc.etc.
Finishing with "The pywin32 extensions were succesfully installed" ...
I only read the last sentence and I started to run some code resulting in getting these dll load fails.
So, did some research, and started an elevated prompt (how: see "http://www.sevenforums.com/tutorials/783-elevated-command-prompt.html") and again ran:
c:\python34>python.exe Scripts\pywin32_postinstall.py -install
Copied pythoncom34.dll to C:\Windows\system32\pythoncom34.dll
Copied pywintypes34.dll to C:\Windows\system32\pywintypes34.dll
Registered: Python.Interpreter
Registered: Python.Dictionary
Registered: Python
-> Software\Python\PythonCore\3.4\Help[None]=None
-> Software\Python\PythonCore\3.4\Help\Pythonwin Reference[None]='C:\\Python34\\Lib\\site-packages\\PyWin32.chm'
Pythonwin has been registered in context menu
Shortcut for Pythonwin created
Shortcut to documentation created
The pywin32 extensions were successfully installed.
And now my code runs happily (as far as this matter is concerned... sigh, so much other stuff to do).
Run the installer as Administrator and it works:
Right click on pywin32-installer.exe
Choose "Run as Administrator"
As suggested above the post install script is not run, this issue can be seen when installing from a wheel (As I encountered)
python scripts\pywin32_postinstall.py -install
If find you have this issue when installing via wheels, then installing it from here can solve the above issue.
https://pypi.python.org/pypi/pypiwin32
There appears to be a bug in the installer. The recommended workaround in the ticket is the same one as proposed by Dave Bremer.
I could fix this situation by removing all installed Python3.4 versions (had forgotten to uninstall 3.4.1 before installing 3.4.2), deleting C:\Python34 and after installing Python 3.4.2 pywin32-219.win32-py34.exe could be installed and called without problems.
So, copying around DLLs should NOT be necessary!
I always install the Active State Python distro which installs the win32 packages for you and gets it right.
If the above didn't fix the problem, you're still missing the msvcr100.dll file. It's either in your \System32\ folder, or more likely in your c:\PythonXX\Lib\site-packages\win32\ folder.
That fixed it for me after hours of search to no avail, even though it looks like the import still isn't resolved as it should be (PyCharm still gives me the squiggly underline), but it works.
First I was using pip to install pywin32 in anaconda environment, that's why no matter what I did it was failing. After trial and error, I figured out that
conda install pywin32
is the right way to install pywin32 in the anaconda package manager.
I don't know whether it's too late or not to answer this question. I also hit this problem, and I tried every method above, but neither of them worked.
Finally, I found the reason. When we install pywin32, we must choose the one that fits python's version(2.6, 2.7, 3.3, etc) and python's bit number(x64 or x86). Notice, it must fit python's bit number, not PC's bit number. If you install x86 python in a x64 PC, you have to install a pywin32 with x86.
In my case i had to copy pywintypes26.dll and pythoncom26.dll files into C:\Windows\System32 folder to work it properly in jupyter notebook.
I am using windows 10 OS with multiple python versions