lib

Opening a wave file in python: unknown format: 49. What's going wrong?

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I try to open a wave file with the wave module, but I keep getting the same error whatever I try. The line with the error is the following: wav = wave.open(f) This is the error message: Traceback (most recent call last): File "annotate.py", line 47, in <module> play(file) File "annotate.py", line 33, in play wav = wave.open(f) File "C:\Program Files (x86)\Python\lib\wave.py", line 498, in open return Wave_read(f) File "C:\Program Files (x86)\Python\lib\wave.py", line 163, in __init__ self.initfp(f) File "C:\Program Files (x86)\Python\lib

Unable to “run” on Heroku

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have deployed a Clojure app to Heroku. When I run/request it I get an error: http://glowing-planet-168.herokuapp.com/ . So now I want to start up a REPL to see if I can get some more info. But when I try it I get: D:\Mijn documenten\My Dropbox\dev\clojure-projects\hebrewajax>heroku run lein repl C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/heroku-2.2.4/lib/heroku/helpe rs.rb:213:in ``': No such file or directory - tput cols (Errno::ENOENT) from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/heroku-2.2.4/lib /heroku/helpers.rb:213

PCL (point cloud library) 1.7 on Ubuntu 16.04 LTS build error

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I updated Ubuntu version from 14.04 lts to 16.04 lts and got problems when building projects that utilizes point cloud library. (It used to work well on Ubuntu 14.04 and I build my projects with qtcreator) The warning messages I have are : warning: libboost_system.so.1.54.0, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_common.so, may conflict with libboost_system.so.1.58.0 warning: libboost_thread.so.1.54.0, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_common.so, may conflict with libboost_thread.so.1

Undefined boost python symbol: boost::python::detail::init_module

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I get an undefined symbol error when trying to import an extension compiled with boost python, and the symbol is one that should be included in the boost library. I am using Boost 1.46.1, Python 3.1.2, and GCC 4.4.5. I've built boost using: $ ./bootstrap.sh --with-python-version=3.1 $ sudo ./bjam -j4 install I then compiled the following trivial Boost Python library: #include <boost/python.hpp> struct mystruct { int i; }; BOOST_PYTHON_MODULE(test) { using namespace boost::python; class_<mystruct>("Mystruct") .def_readwrite("i", &mystruct::i)

Using Django with virtualenv, get error ImportError: No module named 'django.core.servers.fastcgi'

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm using virtualenv and trying to host my django app. I'm using Python 3.5 and Django 1.9.2. I can run import django fine. When I run from django . core . servers . fastcgi import runfastcgi I get the error Traceback ( most recent call last ): File "<stdin>" , line 1 , in <module> ImportError : No module named 'django.core.servers.fastcgi' My Path: [ '' , '/home/wrapupne/venv/lib/python35.zip' , '/home/wrapupne/venv/lib/python3.5' , '/home/wrapupne/venv/lib/python3.5/plat-linux' , '/home/wrapupne/venv/lib/python3.5/lib-dynload' ,

Homebrew + Python on mac os x 10.8: Fatal Python error: PyThreadState_Get: no current thread importing mapnik

匿名 (未验证) 提交于 2019-12-03 02:30:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have 2 pythons on my mac (10.8.3): The default, and 2.7 version from homebrew. So far, I could install modules and use them with my brew python. I installed mapnik with brew install mapnik (mapnik-2.1.0) and it compiled correctly. But, if I open python and enter import mapnik , the following error comes and python exits: >>> import mapnik Fatal Python error : PyThreadState_Get : no current thread Abort trap : 6 Mac os x also shows an error window, with the following content: Process : Python [ 60666 ] Path : /usr/ local / Cellar

how to install libcurl on windows 7 64bit

匿名 (未验证) 提交于 2019-12-03 02:30:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am getting the following error while installing: C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/json_web_token-0.3.2/lib/json_web_token.rb:36: warning: already initialized constant JWT C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/jwt-1.5.6/lib/jwt/json.rb:4: warning: previous definition of JWT was here rake aborted! LoadError: Could not open library 'libcurl': The specified module could not be found. . Could not open library 'libcurl.dll': The specified module could not be found. . Could not open library 'libcurl.so.4': The

Ant + Class-path Issue

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have written an ANT script and finally am building the jar here is the building of jar section <jar jarfile = "${destination}/@{name}.jar" > <fileset dir = "${output}" > <include name = "abc/xyz/@{name}/**" /> </fileset> <zipfileset dir = "lib" prefix = "lib/" /> <manifest> <attribute name = "Main-Class" value = "com.abc.xyz.HelloWorld" /> <attribute name = "Class-Path" value = ".:lib/activation.jar:lib/antlr-2.7.6.jar:lib/asm-attrs.jar:lib/asm.jar:lib/cglib-2.1.3.jar:lib/commons-collections-2.1.1.jar:lib/commons-logging-1.1.jar

PyAudio prints ALSA warnings and does not work

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: hey guys i'm trying to run a basic python speech to text code. This is the code. import speech_recognition as sr r = sr.Recognizer() with sr.Microphone() as source: audio = r.listen(source) try: print("You said " + r.recognize(audio)) except LookupError: print("Could not understand audio") The code works fine till it reaches the print stage and then throws this error. Is there anything that i have done wrong? ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards

Python can&#039;t import shapely

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using Python3.4 on Mac OSX and I am trying to import shapely. I am however unable to do so. Here is my traceback: from shapely.geometry import Point File "/Users/tc9/Library/Python/3.4/lib/python/site-packages/shapely/geometry/__init__.py", line 4, in <module> from .base import CAP_STYLE, JOIN_STYLE File "/Users/tc9/Library/Python/3.4/lib/python/site-packages/shapely/geometry/base.py", line 9, in <module> from shapely.coords import CoordinateSequence File "/Users/tc9/Library/Python/3.4/lib/python/site-packages/shapely/coords.py", line 8