w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Installing anaconda to use with windows
well you might have two installations of python, one inside the anaconda package, and other which you might have installed earlier. try doing : which python from CygWin console. If it returns: /usr/bin then it is definitely a add-to-path problem. to fix it for CygWin, you have to add the python installation from anaconda to the path. try this fromn CygWin: PATH=path-where-anaconda-is-installed/anaconda/bin:$PATH and then doing: which python should give you: /path-to-anaconda/anaconda/bin and then it will work. Cheers

Categories : Python

Trouble installing Pygame on a Mac
This is a typical architecture issue. Try a file /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so If one of the result lines includes your architecture (e.g. i386), then the problem is not from the package itself, but from the way you launched it. Try then to launch it from a 32 bits instance of Python: python2.7-32 >>>import pygame NB: you can guess your architecture with uname -m

Categories : Python

Having trouble installing pygame?
it looks like you are using 64 bit python and you installed 32 bit pygame you will need to find a win64 version ... or what ever the 64 bit version is... or install the 32 bit python and use that (I use 32 bit python on my 64 bit machine)

Categories : Python

Pygame: Font module not available
(self answer) Problem: Using 32-bit Pygame with 64-bit Python generally isn't a good idea. Solution: Always use Python and Pygame both in 64-bit architecture. (Or 32). P.S. Currently there doesn't seem to be a 64-bit Pygame for OS X, so you'll have to use a 32-bit Python. P.S.S (After installing a 32-bit Python you may need to re-install the 32-bit Pygame for it to have any effect. This is what happened to me)

Categories : Python

ImportError: No module named 'pygame'
I was trying to figure this out for at least an hour. And you're right the problem is that the installation files are all for 32 bit. Luckily I found a link to the 64 pygame download! Here it is: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame Just pick the corresponding version according to your python version and it should work like magic. The installation feature will bring you to a bright-blue screen as the installation (at this point you know that the installation is correct for you. Then go into the Python IDLE and type "import pygame" and you should not get any more errors. Props go to @yuvi who shared the link with StackOverflow.

Categories : Python

Problems in installing perl GD module
Install the gd package: yum install gd It can be found in the rhel-6-server-rpms repository. And please let us know what the perlmod installer is.

Categories : Perl

Error in installing node.js module using npm
You need to add VCBuild.exe to your path. Check out this answer on how to do it: Testacular install failes, no vcbuild.exe

Categories : Node Js

Installing Audiere Module on Python 2.7 Windows 7
You can try to use pyglet. This library has the capability to play using external library called Avbin. Simple example of how to use: import pyglet music = pyglet.resource.media('music.mp3') music.play() pyglet.app.run() If you have some problems with avbin, put the dll in the same directory of your code and insert this two lines before "pyglet.resource.media('music.mp3')": pyglet.lib.load_library('avbin') pyglet.have_avbin=True

Categories : Python

installing request module in python 2.7 windows
There are four options here: Get virtualenv set up. Each virtual environment you create will automatically have pip. Get pip set up globally. Learn how to install Python packages manually—in most cases it's as simple as download, unzip, python setup.py install, but not always. Use Christoph Gohlke's binary installers.

Categories : Python

Drupal toolbar is not showing after installing Views module
Vist "yoursite.com"/admin/modules and check that the toolbar module is not un selected. If its still selected, try installing the admin_menu toolbar, it looks a lot nice, and comes with a smooth dropdown menu. https://drupal.org/project/admin_menu Or, you say you were doing work on your theme, check that you didnt set anything with a very high z-index that would cover the toolbar

Categories : Drupal

python 2.7 module pandas not installing "cannot import name hashtable"
The recommended way to install pandas is via pip: pip install pandas This hashtables error arises from the cython files not being built. This error message will be more informative from 0.11.1.

Categories : Python

Installing Perl module on cygwin (make failed)
Generally, you must use the same compiler for XS that was used to compile Perl. You can try to force the one you have and see what happens: cpan> look Digest::SHA1 Digest-SHA1-2.13$ perl Makefile.PL CC=/usr/bin/gcc LD=/usr/bin/gcc Digest-SHA1-2.13$ make ; make test ; make install

Categories : Perl

Installing OpenCV with python module on CentOS goes wrong
I answer my own question. hope someone who suffers the same problem find a way out of it in a short time. 1.First of all, just update all pagackages using yum I got several bugs attributed to dependency issues when installing OpenCV. sudo yum update --skip-broken 2.Rebuild your Python with "--enable-shared". OpenCV with python module requires the "libpython2.7.so" file to be built correctly. However if you have just built python without this configuration, it's likely that you do not have this file. "libpython2.7.a" is not enough. In my case, when I refer libpython2.7.a to be a python library source it crashed down continuously. So.. download python 2.7.5 (or something like this), and reconfigure like this. ./configure --enable-shared make make install Now you might get "libp

Categories : Python

Python installing PyQt4 module to custom software
That binary version of PyQt4 only supports python2.7, so no matter what you do, you won't get it to run with python2.5. The last PyQt4 version with a binary for python2.5 is PyQt4.9.4, so if you want to have any chance of making this work you should try with this version. Note however that the software you distribute like this will also only run on python2.5.

Categories : Python

Installing functools gives me AttributeError 'module' object has no attribute 'compose'
Python2.7 comes with the functools module included. You can install functools32 if you want to get the lru-cache decorator, which was introduced with Python3.2. Edit: I actually checked this. I got the same error when I tried to pip-install functools with Python2.7. Simply do import functools and proceed as usual.

Categories : Python

error on installing passenger nginx module on ubuntu with ruby 2.0.0 via rvm
You have to install development tools first. Most likely you're missing some libraries just like the error is indicating. I ran into the same thing a couple weeks back. Here is a nice tutorial similar to the one that helped me out. http://alexpearce.me/2012/06/setting-up-a-vps/ With a little bit of luck, I believe that this line will solve your current issues, but be sure to look over the whole document. sudo apt-get -y install curl git-core python-software-properties build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libcurl4-openssl-dev Also: I've also always had troubles when using rvm and have found that rbenv works with less hiccups, which is actually mentioned in this tutorial. For databases, if you aren't using postgres then you should be able to just swap out the

Categories : Ruby On Rails

ImportError: No module named 'urllib2' when installing Package Manager in Sublime Text 3
It appears that you followed the instructions for installing on Sublime Text 2. For now on Sublime Text 3 you must install using git. The instructions from the site follows: cd Packages/ git clone https://github.com/wbond/sublime_package_control.git "Package Control" cd "Package Control" git checkout python3 Note: The Packages/ folder on the first line refers to the folder that opens when you use the Preferences > Browse Packages… menu. Here is a link to the relavant section of the page

Categories : Python

Issue with installing Postgres on Vagrant VM using Chef: undefined method `ruby' for Config:Module
There appears to be a problem installing the "pg" gem: ================================================================================ Error executing action `install` on resource 'chef_gem[pg]' ================================================================================ Gem::Installer::ExtensionBuildError ----------------------------------- ERROR: Failed to build gem native extension. /opt/vagrant_ruby/bin/ruby extconf.rb checking for pg_config... yes Using config values from /usr/bin/pg_config

Categories : Ruby

"Error: No module named haystack" after installing django haystack inside virtualenv
Found answer here: python packages not installing in virtualenv using pip The problem was that I was using sudo with pip in my virtualenv. As a result, pip was installing outside of my virtualenv.

Categories : Python

How To Require Node Module In Node REPL Without Installing Globally?
Printing undefined is normal behavior for both the browser console and the node repl. Try typing: express. (tab key) - you should get something like this: > var express = require('express'); undefined > express. express.__defineGetter__ express.__defineSetter__ express.__lookupGetter__ express.__lookupSetter__ express.constructor express.hasOwnProperty express.isPrototypeOf express.propertyIsEnumerable express.toLocaleString express.toString express.valueOf express.apply express.arguments express.bind express.call express.caller express.constructor express.length express.name express.toString

Categories : Node Js

Anaconda default directory
Double your backslashes. pd.read_csv('C:\Users\aaa\Desktop\contrylist.csv') Or use raw strings: pd.read_csv(r'C:UsersaaaDesktopcontrylist.csv') Backslash is a special character in string literals and it's used for escaping. You should read the docs: strings and string literals.

Categories : Python

Pyqtgraph with anaconda python on MAC gives nib error
The solution is to use python.app (or the equivalent pythonw) to run the program, instead of just python. If pyqtgraph installed any commands, you'll need to edit them so that their shebang line calls #!/path/to/anaconda/bin/python.app/Contents/MacOS/python.

Categories : Python

Explicitly accessing module var from module function in revealing module pattern
I want the function sayOhai to say "ohai" using the defined var. Assumed i do not want to change the parameter name of sayOhai, how can i access foo's value within sayOhai? You simply can't. The var foo is shadowed by the inner function parameter with the same name.

Categories : Javascript

How to keep track of pip installed packages in an Anaconda (conda) env?
conda will only keep track of the packages it installed. And pip will give you the packages that were either installed using the pip installer itself or they used setuptools in their setup.py so conda build generated the egg information. So you have basically three options. You can take the union of the conda list and pip freeze and manage packages that were installed using conda (that show in the conda list) with the conda package manager and the ones that are installed with pip (that show in pip freeze but not in conda list) with pip. Install in your environment only the python, pip and distribute packages and manage everything with pip. (This is not that trivial if you're on Windows...) Build your own conda packages, and manage everything with conda. I would personally recommend the

Categories : Python

Anaconda's NumbaPro CUDA Assertion Error
The problem is you are using vectorize on a function that takes non-scalar arguments. The idea with NumbaPro's vectorize is that it takes a scalar function as input, and generates a function that applies the scalar operation in parallel to all the elements of a vector. See the NumbaPro documentation. Your function takes a matrix and a vector, which are definitely not scalar. [Edit] You can do what you want on the GPU using either NumbaPro's wrapper for cuBLAS, or by writing your own simple kernel function. Here's an example that demonstrates both. Note will need NumbaPro 0.12.2 or later (just released as of this edit). from numbapro import jit, cuda from numba import float32 import numbapro.cudalib.cublas as cublas import numpy as np from timeit import default_timer as timer def gener

Categories : Python

pip install lxml and gdal failing in anaconda env
Here is my $0.02, in my experience lxml installs on OS X have always caused problems because of the libmxl2 and libxslt dependencies. The specific issue here is that the 'cpl_port.h' is not being found suggesting that you don't have the headers for gdal on your system, a similar issue to the one I've encountered with lxml. I found this StackExchange post gdal package missing which addresses building and installing gdal with your specific error using pip and a virtual Ubuntu machine, but the idea is the same. The pip tool need to be told explicitly where to find the headers for gdal. In general the issue is that OS X puts headers in non standard places for a *nix system, and quite often dependencies are several revision behind the version used for development of the packages you are trying

Categories : Python

cannot import numpy in idle (2.7) after anaconda installation
So you have several python installations going; which one is idle using? This should get you pointed in the correct direction for finding modules: http://docs.python.org/release/2.7.5/tutorial/modules.html#the-module-search-path (Tweak the version number in that URL as appropriate.) If that doesn't help, then the list of Related questions, to the right, currently has this as the first hit, and it looks useful too.

Categories : Python

How to override anaconda/kickstart package ordering?
Your package "thirdparty-tools" needs to specify all of its requirements. If you can get a SRPM of this package, you can modify the spec to indicate that you need coreutils, bash, etc in your package. If you can't modify this package at all, your best option is to create a wrapper package that has the necessary requirements. Just use your favorite editor to create a file "thirdparty-tools-installer.spec" and ensure you include coreutils as a requirement as well as "thirdparty-tools". You can refer to rpm.or for more information http://www.rpm.org/max-rpm/s1-rpm-build-creating-spec-file.html Lastly, you can just do yum -y install thirdparty-tools in the %post section of Kickstart. It's uglier for sure, but it will probably work.

Categories : Linux

Installing SQL objects in C# - issue when installing CLR assembly and function scripts
I have now fixed this problem. The issue turned out to be that I was using the same SQLCommand later on to execute a stored procedure (as I have given the command a SQLTransaction so I can rollback if it fails) and had forgotten to remove the parameters that were added when I run the next text command. Therefore it was running the first script file and failing afterwards.

Categories : C#

Installing M2Crypto inside of virtualenv without installing swig to the system
So in the end I got this to work by letting buildout handle downloading and installing swig and M2Crypto and then just moving the built M2Crypto and EGG-INFO directories from where buildout put them to where virtualenv wanted them...this might not be the optimal solution, but hey, it worked.

Categories : Python

Importing scipy.misc.pilutil in python using Komodo and Anaconda?
The problem is that the scipy.misc.__init__ deletes the pilutil module - relevant code line - so you cannot import it directly. But all functions from the pilutil module are, before that, added to the misc module, and you can use them from there: In [1]: from scipy import misc In [2]: misc.fromimage Out[2]: <function scipy.misc.pilutil.fromimage> In [3]: misc.bytescale Out[3]: <function scipy.misc.pilutil.bytescale>

Categories : Python

Installing setuptools prior to installing python dependencies on Mac
You command attempts to install files into system directories. You must execute the command as root or with sudo: sudo sh setuptools-0.6c11-py2.7.egg You can see this error with the: [Errno 13] Permission denied Edit: If you don't have permissions, you can try installing into your user's Library folder, or look at virtualenv. (See the part about using locally from source.)

Categories : Python

Anaconda: Where and how to install a non-distribution package to support a flask-wtf conda recipe?
The only way that conda build will see dependencies is if they also exist as conda packages. So you need to build the conda package for wtforms as well. Fortunately, the recipe for this exists in the conda-recipes as well, so you can just clone that repo and do conda build wtforms conda build flask This works because conda is able to find the packages that it has already built. To make sure that they don't get lost if you delete the build directory, it's recommended to upload your packages to Binstar. If you do that and conda install binstar, after you build, it will ask you if you want to upload the package to binstar. If you do that, and also add your Binstar repo to your .condarc, those packages will always be available for you to conda install.

Categories : Python

Checking and Installing .net 4.0 before while installing my forms app in SharpSetup WIX
You can check if the .NET framework is installed by linking to the NetFxExtension with light. Just add a PropertyRef to the one you want. You can find a list of those properties here. Say you want to make sure .NET framework 4.0 Full is present before installing your software, you'd add this somewhere in your source code: <PropertyRef Id="NETFRAMEWORK40FULL" /> <Condition Message=".NET Framework 4.0 Full is not installed."> NETFRAMEWORK40FULL </Condition> When running the MSI, the LaunchConditions action will run and check if the NETFRAMEWORK40FULL property is set. If it is, the installation continues, if not, the installation fails. However, if you wanted to install the .NET Framework beforehand, you'll need two WiX projects. One for your basic MSI, and one for

Categories : Dotnet

What is the difference between installing an app via homebrew or installing it "normal"?
homebrew (like Macports) is a package manager. It allows you to manage packages (update, delete etc.). Most importantly, homebrew will compile the application on your platform. That's especially important for ports, e.g. from Linux. homebrew will give you greater and more fine grained control over what you install, where, what compilation attributes you want to use etc. But this comes at the cost of a bit more complexity and the need to know your way around the command line. Downloading a binary and putting it in the Applications folder is easier by far and usually works fine. If your not a developer and don't need to manage many different tools then I'd recommend sticking with binary downloads. If you're a developer however, you will most likely not get around a package manager if you n

Categories : Osx

Rails installing mysql - Error installing mysql2: ERROR: Failed to build gem native extension
I've been so annoyed by the same problem, and finally succeeded in installing mysql2. Kudos to odiszapc@github. It appears any other solution I've found via Google than below doesn't work to me. Copied and pasted from here. So no credit to me. gem uninstall mysql2 Download last MySQL connector from http://cdn.mysql.com/Downloads/Connector-C/mysql- connector-c-noinstall-6.0.2-win32.zip Extract it to C:connector-6.0.2 gem install mysql2 --platform=ruby -- '--with-mysql-lib="C:connector-6.0.2lib" --with-mysql-include="C:connector-6.0.2include" --with-mysql-dir="C:connector-6.0.2"' Additional info on mine. ruby 1.9.3p392 (2013-02-22) [i386-mingw32] Rails 3.2.13 MySQL Server 5.6 mysql2-0.3.13 P.S Even if you successfully installed mysql2, you may still need some work (e.g. mysql2

Categories : Mysql

Can I add a method to a requirejs module used as dependency in another module and have it available every time the module is loaded as dependency?
Short answer: Yes. The module needs to be an object/instance (not a class) and it will work with requirejs. Long answer: When you require a module as a dependence for the first time Requirejs generates an object, and for the next times you requires the module Requirejs will return the object it generated the first time. So all the times you require a module you get always the same reference of the object. With define([], function () { var app = { //my methods. }; return app; }); and define(['app'], function (app) { app.newMethod = function (){ // ... }; }); you can use app like this: define(['app'], function (app) { app.newMethod(); }); But injecting methods from one object to an other is a really bad practice. If you need something f

Categories : Javascript

Does drupal "views infinite scroll" module work with "image matrix" module?
According to this issue for imagematrix module: "Views Infinite Scroll does not handle non-standard view styles". But That means that by default the 2 modules does not work together.

Categories : Drupal

Import python module over the internet/multiple protocols or dynamically create module
In principle, yes, but all of the tools built-in which kinda support this go through the filesystem. To do this, you're going to have to load the source from wherever, compile it with compile, and exec it with the __dict__ of a new module. See below. I have left the actually grabbing text from the internet, and parsing uris etc as an exercise for the reader (for beginners: I suggest using requests) In pep 302 terms, this would be the implementation behind a loader.load_module function (the parameters are different). See that document for details on how to integrate this with the import statement. import imp modulesource = 'a=1;b=2' #load from internet or wherever def makemodule(modulesource,sourcestr='http://some/url/or/whatever',modname=None): #if loading from the internet, you'd

Categories : Python

Change default source directory for perl module Module::Build
use Module::Build; use File::Copy 'cp'; my $class = Module::Build->subclass(code => <<''); sub process_EXTRALIB_files { my ($self, $target) = @_; while (my ($from, $to) = each %{ $self->{properties}{"${target}_files"} }) { cp $from, $to; $self->_add_to_manifest('MANIFEST', $to); } } my $self = Module::Build->new( ⋮ RESOURCES_files => {'RESOURCES/prepare/form.html' => 'RESOURCES/new/prepare/form.html'}, EXTRALIB_files => {'../../LIBS/perl/Private/DB.pm' => '../lib/Private/DB.pm'}, ); $self->add_build_element('RESOURCES'); $self->add_build_element('EXTRALIB'); $self->create_build_script; perl Build.PL ./Build ./Build manifest ./Build dist

Categories : Perl



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.