-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get 'unable to find vcvarsall.bat when 'import surprise' #5087
Comments
Did you start Spyder from a system terminal (cmd.exe) before running this? |
I started with the icon created by Anaconda when installing it. I am tried to start from a cmd.exe and type in 'spyder' (as you suggested). Then type in 'import surprise'. Both the same error.
On Wednesday, August 30, 2017 1:23 AM, Carlos Cordoba <[email protected]> wrote:
Did you start Spyder from a system terminal (cmd.exe) before running this?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
No idea why this is happening, sorry. We'll try to take a look at this in a future release. |
Thanks for your reply. Please take a look if possible. It's very annoying that I have to switch to other IDE when using that package (python package called surprise) as I am working on some project that I need to use it very often. This is especially true when Spyder 3.2.1 only supports ipython console now (in the past, I could choose to use python console to avoid this problem.) Thanks.
On Wednesday, August 30, 2017 9:20 AM, Carlos Cordoba <[email protected]> wrote:
No idea why this is happening, sorry. We'll try to take a look at this in a future release.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Same issue here with surpriselib as well File "", line 1, in File "C:\Anaconda\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile File "C:\Anaconda\lib\site-packages\spyder\utils\site\sitecustomize.py", line 86, in execfile File "E:/Dropbox_mk/Dropbox (Personal)/PyCode/Testbed/surp.py", line 1, in File "C:\Anaconda\lib\site-packages\surprise_init_.py", line 3, in File "C:\Anaconda\lib\site-packages\surprise\prediction_algorithms_init_.py", line 22, in File "C:\Anaconda\lib\site-packages\surprise\prediction_algorithms\algo_base.py", line 10, in File "C:\Anaconda\lib\site-packages\pyximport\pyximport.py", line 458, in load_module File "C:\Anaconda\lib\site-packages\pyximport\pyximport.py", line 233, in load_module File "C:\Anaconda\lib\site-packages\pyximport\pyximport.py", line 215, in load_module File "C:\Anaconda\lib\site-packages\pyximport\pyximport.py", line 191, in build_module File "C:\Anaconda\lib\site-packages\pyximport\pyxbuild.py", line 102, in pyx_to_dll File "C:\Anaconda\lib\distutils\dist.py", line 953, in run_commands File "C:\Anaconda\lib\distutils\dist.py", line 972, in run_command File "C:\Anaconda\lib\site-packages\Cython\Distutils\old_build_ext.py", line 185, in run File "C:\Anaconda\lib\distutils\command\build_ext.py", line 340, in run File "C:\Anaconda\lib\site-packages\Cython\Distutils\old_build_ext.py", line 193, in build_extensions File "C:\Anaconda\lib\distutils\command\build_ext.py", line 499, in build_extension File "C:\Anaconda\lib\distutils\msvc9compiler.py", line 473, in compile File "C:\Anaconda\lib\distutils\msvc9compiler.py", line 383, in initialize File "C:\Anaconda\lib\distutils\msvc9compiler.py", line 271, in query_vcvarsall ImportError: Building module surprise.similarities failed: ['DistutilsPlatformError: Unable to find vcvarsall.bat\n'] the interesting thing is that runing the same script from the command line (outside of spyder) works without any problem. |
This is a duplicate of issue #5299. |
I am getting this error too. Looked at the duplicate issue but don't know how to fix? |
@jmrichardson, we're working on a fix (#6607). It'll be available in our 3.2.8 version. |
Description
Get 'unable to find vcvarsall.bat when trying to run 'import surprise'. Package surprise is a python package which was installed successfully by 'pip install numpy' and 'pip install scikit-surprise'. I have tried running 'import surprise' under ipython and jupyter-notebook in the same machine, both run successfully. However, 'import surprise' gives me 'unable to find vcvarsall.bat when 'import surprise' in spyder.
What steps will reproduce the problem?
What is the expected output? What do you see instead?
I expect the command goes okay. But I got the followings:
import surprise
Traceback (most recent call last):
File "", line 1, in
import surprise
File "C:\ProgramData\Anaconda2\lib\site-packages\surprise_init_.py", line 3, in
from .prediction_algorithms import AlgoBase
File "C:\ProgramData\Anaconda2\lib\site-packages\surprise\prediction_algorithms_init_.py", line 22, in
from .algo_base import AlgoBase
File "C:\ProgramData\Anaconda2\lib\site-packages\surprise\prediction_algorithms\algo_base.py", line 10, in
from .. import similarities as sims
File "C:\ProgramData\Anaconda2\lib\site-packages\pyximport\pyximport.py", line 458, in load_module
language_level=self.language_level)
File "C:\ProgramData\Anaconda2\lib\site-packages\pyximport\pyximport.py", line 233, in load_module
exec("raise exc, None, tb", {'exc': exc, 'tb': tb})
File "C:\ProgramData\Anaconda2\lib\site-packages\pyximport\pyximport.py", line 215, in load_module
inplace=build_inplace, language_level=language_level)
File "C:\ProgramData\Anaconda2\lib\site-packages\pyximport\pyximport.py", line 191, in build_module
reload_support=pyxargs.reload_support)
File "C:\ProgramData\Anaconda2\lib\site-packages\pyximport\pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "C:\ProgramData\Anaconda2\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\ProgramData\Anaconda2\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda2\lib\site-packages\Cython\Distutils\old_build_ext.py", line 185, in run
_build_ext.build_ext.run(self)
File "C:\ProgramData\Anaconda2\lib\distutils\command\build_ext.py", line 340, in run
self.build_extensions()
File "C:\ProgramData\Anaconda2\lib\site-packages\Cython\Distutils\old_build_ext.py", line 193, in build_extensions
self.build_extension(ext)
File "C:\ProgramData\Anaconda2\lib\distutils\command\build_ext.py", line 499, in build_extension
depends=ext.depends)
File "C:\ProgramData\Anaconda2\lib\distutils\msvc9compiler.py", line 473, in compile
self.initialize()
File "C:\ProgramData\Anaconda2\lib\distutils\msvc9compiler.py", line 383, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\ProgramData\Anaconda2\lib\distutils\msvc9compiler.py", line 271, in query_vcvarsall
raise DistutilsPlatformError("Unable to find vcvarsall.bat")
ImportError: Building module surprise.similarities failed: ['DistutilsPlatformError: Unable to find vcvarsall.bat\n']
Please provide any additional information below
I installed spyder via Anaconda (for python 2.7), hence got ipython and jupyter-notebook as well. All running fine with 'import surprise', including launching python via cmd. However, spyder is the only one that has the problem. I have already installed MS Visual C++ compiler for Python 2.7.
Version and main components
Dependencies
The text was updated successfully, but these errors were encountered: