w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Modify preseed file to automatically install packages in /pool/extra
Why don't you create a metapackage which depends on all the packages you want installed, and simply set up the preseed to install that. equivs was designed for this sort of thing, although it's not very hard to create a metapackage from scratch with the standard packaging tools, either. To instruct the installer to install packages, you can include the line d-i pkgsel/include string package1 package2 in your preseed file. If you just want to install all the *.deb files from a directory (not a full Apt repository with Packages.gz etc) then maybe d-i preseed/late_command string in-target dpkg -i /pool/extras/*.deb but I would actually prefer a full repo; basically it just takes a run of dpgk-scanpackages.

Categories : Ubuntu

While Sending Html Mails from my web application Recieved Mails contains Symbols like &ldquo,&rdquo, ‘
Check with another constructor for htmlView: ContentType mimeType = new System.Net.Mime.ContentType("text/html"); var htmlView = AlternateView.CreateAlternateViewFromString(bodyMessage, mimeType);

Categories : Asp Net Mvc

python packages -- overriding built-in packages and the dreaded "Module xxxx was already imported" warning
Rename myprogramxlrd to myprogramfrozen_xlrd. Then import it with try: import xlrd except ImportError: import frozen_xlrd as xlrd Alternatively, you could tell Python to silently ignore this particular UserWarning: import warnings warnings.filterwarnings("ignore", message="Module xlrd was already imported", category=UserWarning) Place this early on in the program, before scikits gets imported.

Categories : Python

Install multiple packages on linux (like pip install -r requirements.txt)
Put the list of packages in a text file(say test.txt) with package names separated by spaces, like this - python ruby foo bar then you can just install with apt-get like this - sudo apt-get install $(cat test.txt)

Categories : Linux

Copy files to site-packages
The site-packages directories is supposed to contain modules (e.g. spam.py) or packages (spam/__init__.py). In a setup script, the things referenced in py_modules and packages will get installed in site-packages. Could you explain what it is you want to do that does not work with py_modules or packages?

Categories : Python

Cannot install two packages that use the same namespace
After installing one of your packages and downloading the other… You're not including testsuite/__init__.py and testsuite/prettyprint/__init__.py in the source files. The docs on Namespace Packages the setuptools/pkg_resources way explains: Note, by the way, that your project's source tree must include the namespace packages' __init__.py files (and the __init__.py of any parent packages), in a normal Python package layout. If you don't actually install these files, they don't do any good. You just end up with a testsuite with nothing in it but prettyprint, and that has nothing in it but outcomes, so testsuite and testsuite.prettyprint are not packages at all, much less namespace packages.

Categories : Python

Python: I can't import a module even though it's in site-packages
I extracted the package and placed it in site-packages: No, that's the wrong way of "installing" a package. Python packages come with a setup.py script that should be used to install them. Simply do: python setup.py install And the module will be installed correctly in the site-packages of the python interpreter you are using. If you want to install it for a specific python version use python2/python3 instead of python.

Categories : Python

pyvenv & pip not installing into local site-packages
Did you install setuptools and pip into the environment? virtualenv installs setuptools and pip automatically into a new environment. $ virtualenv qwerty New python executable in qwerty/bin/python Installing setuptools............done. Installing pip...............done. $ According to the pyvenv docs you need to install them into the new environment manually. Common installation tools such as Distribute and pip work as expected with venvs - i.e. when a venv is active, they install Python packages into the venv without needing to be told to do so explicitly. Of course, you need to install them into the venv first: this could be done by running distribute_setup.py with the venv activated, followed by running easy_install pip. Alternatively, you could download the sourc

Categories : Django

How to install Chocolatey packages offline?
Right now we don't have all of them setup. You can edit the package to point the installer to the local resource and rebuild the packages as a workaround for now. You can follow some of our feed about it here: https://groups.google.com/forum/#!searchin/chocolatey/offline

Categories : Misc

How can I install Leiningen packages behind a firewall?
Dependency Tree In order to figure out which jars your project needs you can do: $ lein deps :tree Which will show you something that is called a "dependency tree". It will look similar to: [clj-time "0.5.0"] [joda-time "2.2"] [clojure-complete "0.2.3"] [org.myproject/some-proto "0.0.1-20130523.145830-9"] [org.flatland/protobuf "0.7.2"] [ordered-collections "0.4.0"] [org.flatland/schematic "0.1.0"] [org.flatland/useful "0.9.0"] [com.datomic/datomic-free "0.8.3862"] ... Installing Jars with Lein One simple way to install manually downloaded jars would be to use "lein-localrepo": $ lein localrepo install [-r repo-path] [-p pom-file] <filename> <[groupId/]artifactId>

Categories : Clojure

How to install atmosphere packages without meteorite?
You can create a directory called /packages in your project & then manually install each package and its dependencies. e.g for 'meteor router' in /packages git clone https://github.com/tmeasday/meteor-router.git mv meteor-router router git clone --recursive https://github.com/tmeasday/meteor-page-js-ie-support.git mv meteor-page-js-ie-support page-js-ie-support The second is a dependency on meteor router which you can see on the package's atmosphere page. It's recursive to make sure the submodule pages-js is also git cloned in. Meteor 0.65+ As pointed out by thatjuan: Once you do this, you just need to add the main one to your project. You don't have to add the dependencies. meteor add router

Categories : Meteor

Using install.packages with custom temp dir
The documentation in help(tempdir) pretty clearly states that TMP, TMPDIR, ... are used: By default, ‘tmpdir’ will be the directory given by ‘tempdir()’. This will be a subdirectory of the per-session temporary directory found by the following rule when the R session is started. The environment variables ‘TMPDIR’, ‘TMP’ and ‘TEMP’ are checked in turn and the first found which points to a writable directory is used: if none succeeds ‘/tmp’ is used. So if setting one alone does not help, maybe you want to set several, and make sure the permissions on your 'replacement directory' are permissive enough etc pp.

Categories : R

CertificateError when trying to install packages on a virtualenv
When I try to connect to pypi I get the following error: pypi.python.org uses an invalid security certificate. The certificate is only valid for the following names: *.addvocate.com , addvocate.com So either pypi is using the wrong ssl certificate or somehow my connection is being routed to the wrong server. In the meantime I have resorted to downloading directly from source URLs. See http://www.pip-installer.org/en/latest/usage.html#pip-install

Categories : Python

pip not installing to site-packages directory from within virtualenv when I use a requirements.txt
So I figured out the answer to my own question. Basically, if you are running Python 2.7 (and likely other versions) on Windows, some packages don't play nicely. If anyone else is having this problem, you should download Windows binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/ and remove those packages from your requirements.txt file. Once I did so, pip stopped crashing during the install process and correctly installed the rest of the packages in my requirements.txt file. The packages I needed were: pillow psycopg reportlab

Categories : Python

Python 2.7 not searching folders inside of site-packages
For Linkedin authentication backend, you should import this way, from social.backends.linkedin import LinkedinOAuth for OAuth2, from social.backends.linkedin import LinkedinOAuth2

Categories : Python

Packages installed by `pip install -r requirements.txt` are not found
Are you doing sudo pip install django-mediasync or sudo pip install -r requirements.txt? If so, it'll install it outside of the virtualenv. See How to install which programs requires "sudo" in virtualenv?. Basically because your user should own the virtualenv directory, you don't need superuser privileges to install anything via pip. Do which pip and sudo which pip and you will see they are different. The other possibility may be that your requirements.txt is not installing correctly. It may output lines like the line you mention, but apparently pip will scan all the packages in the requirements.txt before installing anything. If there is any error, it will abort the install for all packages.

Categories : Python

Why does `pub install` keep creating `packages` link in all the subdirs of `web`?
When Dart sees an import like: import 'package:foo/foo.dart'; It translates it to: import '<url of your entrypoint>/packages/foo/foo.dart'; So, say your app's entrypoint is in: myapp/web/app/main.dart If it has a "package:" import, like above, it will remap it to: import 'myapp/web/app/packages/foo/foo.dart'; That means that for Dart to be able to find foo.dart, there needs to be a packages directory inside app that contains foo/foo.dart. Part of pub's job is to set that up for you. This is definitely not the nicest part of working with Dart and pub. Spewing symlinks everywhere is gross, but it deals with the limitations that the language places on us. Over time, we're hoping to move away from having to create these symlinks. More details on this here.

Categories : Dart

Make apt install packages from a specific repository
What I ended up doing is simply install all packages and then remove the ones with an old build. I.e. sudo add-apt-repository ppa:marutter/c2d4u -y sudo add-apt-repository ppa:marutter/rrutter -y sudo apt-get update sudo apt-get install r-bioc-* sudo apt-get install r-cran- And then in R: which(installed.packages()[,"Built"] < 3.0)

Categories : R

Can't install basic packages on Debian EC2 with Aptitude/apt-get
If you install a package using dpkg that doesn't have all it's dependencies, you can fix it by running: apt-get install -f Note that it will only find packages in your current repositories. If some are still missing, try apt-get update. If that still doesn't work, you will need to find an apt repo which hosts those packages, or install the packages manually.

Categories : Amazon

Setting up a virtural enviroment (venv) with no system site packages
You have to install setuptools and pip manually into the environment. venv in Canopy is backported from the venv in Python 3, so unlike virtualenv, it has no special support for pre-installing these packages into the new environment. Just follow the standard installation instructions for setuptools and pip using the new environment's python executable.

Categories : Python

Convert to virtualenv an existing project by copying site-packages
No, you can't. Python packages often have filesystem paths written to various metadata files. Just take the time to go through the site-packages and install the things into a fresh virtualenv, then call pip freeze to get a serialized list that you can use going forward.

Categories : Python

How to make two packages with the same path name in eclipse?
packages are hierarichal in nature. So if you want to create a package bank.managers.db and there exists a package bank.managers then the db package will go under bank.managers only.

Categories : Java

What packages do I need in order to install scikit-learn on Debian
The exact list of dependencies is written in the the documentation. scikit-learn is available in recent versions of Debian, so if you want to install all the scikit-learn build dependencies at once you can just do: sudo apt-get build-dep python-sklearn Also the Neuro Debian APT repository is updated at each scikit-learn release, so that you can get debian packages for the latest versions from there.

Categories : Python

Can mvn install packages globally (e.g. command line tools like nutch)?
Since maven is java based and from java you can do anything, and you can write your own life-cycles and goals, the answer is: yes, it is possible. Here you can found an example: https://community.jboss.org/wiki/CreatingACustomLifecycleInMaven It is also possible execute a custom script - or whatever you want - with Exec Maven Plugin For more, see: http://mojo.codehaus.org/exec-maven-plugin/ Or on stackoverflow: I want to execute shell commands from maven's pom.xml Regards

Categories : Java

How to install new packages for pyramid without getting a pkg_resources.DistributionNotFound: once a project has been created
pip and setup.py develop should not to be mixed. The latter uses easy_install which is not compatible with pip in the case of namespace packages (these are packages that are installed as subpackages of another parent, such as zope.sqlalchemy installing only the .sqlalchemy part of the full zope.* package). Namespace packages will cause problems between pip and easy_install. On the other hand, most other packages will work fine with whatever system you choose but it's better for you to be consistent. Another thing to double check is that you are actually installing the packages into your virtualenv. You should be able to open the python cli in your virtualenv and import the package. If you can't, then it's probably not installed.

Categories : Python

Pip doesn't install packages to activated virtualenv, ignores requirements.txt
My usual workflow is to pip freeze > someFile.txt and then install with pip install -r someFile.txt So I'm certain that this should work just fine. Unfortunately I can't really tell you anything besides make sure to check that You really are in the virtualenv that you think you are in. Make sure to run workon yourVirtualEnvName to activate it just in case that matters. Make sure to check that pip is within your virtualenv. which pip gives me /path/to/home/.virtualenvs/myVirtEnv/bin/pip Sorry I can't give you a more concrete answer. I have to do this semi-regularly and I've never had a problem with it skipping dependencies. Best of luck!

Categories : Python

AWS Elastic Beanstalk "composer install" fails to find packages
I found out what the problem was. The composer.lock file was in .gitignore and so composer on AWS didn't get it... See here for more details: http://www.michaelgallego.fr/blog/2013/08/19/solving-the-elastic-beanstalk-composer-deployment-problems/

Categories : Amazon

How to set Arcgis Javascript dojoConfig relative path of packages
Try to change your script order in index.html file. Your config settings should load before CDN. <div id="map"></div> <script src="js/application/djConfig.js"></script> <script src="//js.arcgis.com/3.6/"></script> <script src="js/application/bootstrapper.js"></script> </body>

Categories : Javascript

How to give file path from table dynamically in SSIS packages?
Use an Execute SQL Task in the Control Flow to obtain the Excel file path from the database, and put it into an SSIS variable. Then, in your Data Flow, use the variable for your data source file path.

Categories : Sql Server

During pbuilder build: run setup.py --install-layout=deb fails (no rights to write to /usr/lib/python2.7/dist-packages)
Your debian/rules install target must never install any files outside of the build tree. Instead, it should be installing to the package build directory (which, depending on how you're building the rest of the package, is probably debian/$packagename/. With a setup.py, the right switch to accomplish this is --root=debian/$packagename. If you use dh_python2, dh_auto_install, and other debhelper tools appropriately, they will take care of that for you, plus a lot of other important housekeeping such as bytecompiling for various python installations on package install.

Categories : Ubuntu

package code.google.com/p/go.example/hello: exec: "hg": executable file not found in %PATH%. How to get remote golang packages?
The package you are trying to install is under the Mercurial (hg) source control system. You need to install Mercurial to be able to clone the package. http://mercurial.selenic.com/

Categories : Go

Composer - installing packages in parent folder path not a new folder
I wonder what file layout you actually want, but here is what I got: mkdir projectDir cd projectDir That is your empty directory to be filled. composer require slim/slim "2.3.*" That adds the slim framework to your empty directory, i.e. it adds a newly created composer.json file, adds that requirement as well, and installs it. At this point this directory looks pretty much exactly like your myProject -> my project files here.

Categories : PHP

Does virtualenv isolate python itself + python packages, or just python packages?
Virtualenv installs python, but it's installed in the bin directory of the virtualenv you created. Therefore you need to run it with ./bin/python. You can also "activate" the virtualenv by running source bin/activate Which will put the virtualenvs bin directory first in the path (and do some other trickery I think) which will make the virtualenvs Python the default Python, so you can start it with just python. But this is not necessary.

Categories : Python

How to install all the packages that are on machine A onto machine B?
This should be a start sudo dpkg --set-selections < (ssh othermachine dpkg --get-selections) Also consider puppet Ubuntu landscape

Categories : Ubuntu

Jython does not load PYTHONPATH into sys.path
Jython does not use PYTHONPATH: you can see here a discussion. From 2.5 onwards there is a variable that does the same: JYTHONPATH. Before that you can use the trick you already know. Source: Jython and PYTHONPATH

Categories : Python

Nested Packages
package Sudoku::Utils; ⇒ in Sudoku/Utils.pm file ⇒ use Sudoku::Utils; package Sudoku; ⇒ in Sudoku.pm file ⇒ use Soduku;

Categories : Perl

Custom UI for OSX Packages
I figured out a solution. If anyone knows of a better approach for this, let me know. Here's how I did it... First expand the package using pkgutil like so... pkgutil --expand mypackage.pkg mypackage This will explode the package contents into the folder "mypackage". Inside of this folder, create a new folder called "Plugins". Inside of this, you'll place both the plugin bundle as well as the plugin's InstallerSections.plist file. The InstallerSections.plist file is important. Without it, the plugin won't appear. Once you've updated the directory structure, you can flatten it back to a flat package like so... pkgutil --flatten mypackage mypackage.pkg That's what worked for me.

Categories : Osx

Compile C packages on OSX 10.9
This is a known cgo bug ( probably http://code.google.com/p/go/issues/detail?id=6515 ) You can download a 1.2 release candidate from https://code.google.com/p/go/downloads/list - as of 1.2rc2 this bug is claimed to be fixed. Per comment 7 from the above bug report (if you don't want to use a release candidate): You can eliminate the option by editing the file src/cmd/cgo/gcc.go and removing the option from the list of options--just search for it.

Categories : Osx

node.js's "bad" packages?
Yes, the code in your example is synchronous. Node.JS has strength from it's asynchronous code, but not absolutely everything is asynchronous. Mostly, the asynchronous code is usful for blocking IO.

Categories : Node Js

Detach several packages at once
?detach explicitly rules out supplying a character vector (as opposed to scalar, ie more than one library to be detached) as its first argument, but you can always make a helper function. This will accept multiple inputs that can be character strings, names, or numbers. Numbers are matched to entries in the initial search list, so the fact that the search list dynamically updates after each detach won't cause it to break. mdetach <- function(..., unload = FALSE, character.only = FALSE, force = FALSE) { path <- search() locs <- lapply(match.call(expand=FALSE)$..., function(l) { if(is.numeric(l)) path[l] else l }) lapply(locs, function(l) eval(substitute(detach(.l, unload=.u, character.only=.c, force=.f), list(.l=l, .u=unl

Categories : R



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