w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Create new virtualenv with selected previously installed python packages
Assuming you installed most of your global packages using pip, you may be able to list all current installed packages in your global installation using this: pip freeze You can further capture this list into a text file: pip freeze > requirements.txt Edit requirements.txt to preserve only packages you want to carry forward to your new installation. Activate your new blank virtual and install your subset of packages: pip install -r requirements.txt

Categories : Python

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 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

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

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

Place folder inside apk and install in the sd card of the installed mobile- android
As you need to place video audio and images in folder along with apk. Then first you need to know that Google Play does not allow us to uplaod apk more than 50MB However you can create APK expansion files and place your all media there. That APK expansion file will automatically install in sdcard. This is the best solution google play has provided. You can try with this- see this link - APK Expansion Edited:- If you are not publishing your app in google play, and size does not matter then you can simply place your all media in to asset folder, and pragmatically create a folder in sdcard copy all file in that folder. Note that - You can not modify assets/ folder is not at runtime, You can not delete or edit those file in asset because APK is signed and cannot be modified at runtime.

Categories : Android

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

makemessages for an app installed in virtualenv
You should probably add translations to the 3rd party app, provided they're general enough for others to re-use. You'll want to pip install a fork of the 3rd party app's repository, with something like this (assuming git and GitHub): pip install -e git://github.com/{{ username }}/{{ reponame }}.git Commit and push your changes, then submit a pull request to the original repository.

Categories : Django

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

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

Cannot install virtualenv using pip
You appear to be using Python 2.4 - try creating the virtualenv with a version of Python which includes from __future__ import absolute_import (Python 2.5 or later). You can specify which Python to use like this: virtualenv -p /usr/bin/python2.7

Categories : Python

how to install virtualenv and/or pip
You are following install guides for linux. You should try to find an install guide for pip and virtualenv on windows. First install pip systemwide and then use pip to install virtualenv systemwide. Then start using virtual environments. Start with How to install pip on W$ and Python and virtualenv on W$. An alternative is the Hitchhiker's guide to python. Edit As Ron Elliott states in the comments, you'll need to point your path to C:Python2xScripts or C:Python3xScripts in order to pick up easy_install and pip as well as any other script executables installing to that directory.

Categories : Python

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

"The gem ... has been deleted. It was installed at" Error. Bundle install doesn't install gems. How to re-install gems?
This solved it for me: "gem install" and "bundle install" do not install gem dependencies after manual gem deletion. How to inform Rubygems that gems were deleted manually? (Delete the .gemspec files for the gems you have removed).

Categories : Misc

How to install GExiv2 on a virtualenv?
Ok, I was looking a better solution, but finally I made a symbolic link inside my virtualenv lib directory and it imports GExiv2 without errors : $ cd virtualenv $ cd lib/python2.7/ $ ln -s /usr/lib/python2.7/dist-packages/gi

Categories : Python

Install numpy in Python virtualenv
The problem is SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel. so do the following in order to obtain 'Python.h' make sure apt-get and gcc are up to date sudo apt-get update sudo apt-get upgrade gcc then install the python2.7-dev sudo apt-get install python2.7-dev and I see that you have most probably already done the above things. pip will eventually spit out another error for not being able to write into /user/bin/blahBlah/dist-packages/ or something like that because it couldn't figure out that it was supposed to install your desiredPackage (e.g. numpy) within the active env (the env created by virtualenv which you might have even changed directory to while doing all this) so do this: pip -E /some/path/env install desiredPacka

Categories : Python

Unable to install matplotlib on OSX 10.8.4 with VirtualEnv
If haven't yet install brew with: ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)" and then do: brew install freetype brew install libpng The last line is probably not needed but just to be sure. Then try again with pip. EDIT: I also suggest you try the conda installer.

Categories : Python

Can't install pycrypto on windows virtualenv
I met the same problem when building Fabric in windows. The reason was mingw32's gcc config when building pycrypto. In configure, gcc's setting -std is set to c99. But, when -std is c99, __STRICT_ANSI__ is defined and typedef _off_t off_t and _off64_t off64_t in "sys/types.h" are skipped. I succeeded to build pycrypto by modifying sys/types.h in mingw32 but it was brutal.

Categories : Python

How do I install python-ldap in a virtualenv on Ubuntu?
I found this blog post which has the answer: http://blog.mattwoodward.com/2012/10/installing-python-ldap-in-virtualenv-on.html Essentially, you need to ensure you have the necessary development libraries installed: sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev

Categories : Python

How to install PyQt5 on a new virtualenv and work on an IDLE
Both "pip install sip" and "pip install PyQt5" inside the virtual enviroment are returning errors. If the errors you're referring to are: Could not find any downloads that satisfy the requirement [pyqt5|sip] and No distributions at all found for [pyqt5|sip] Then this answer should shed light on this. Basically, PyPI is only providing a link to the homepage and/or source -- not a downloadable package or egg. Here are the links to PyQt5 and SIP PyPI pages. I know it seems strange that a package manager wouldn't provide packages, but that's the way it is. You'll have to download, compile, and install sip and pyqt5 from source, inside your virtualenv. I wish I could provide details but I'm currently working through this myself.

Categories : Python

Install python-numpy in the Virtualenv environment
apt-get will still install modules globally, even when you're in your new virtualenv. You should either use pip install numpy from within your virtual environment (easiest way), or else compile and install numpy from source using the setup.py file in the root of the source directory (slightly harder way, see here). I'd also thoroughly recommend you take a look at virtualenvwrapper, which makes managing virtual environments much friendlier. Edit: You should not be using sudo, either to create your virtual environment or to install things within it - it's a directory in your home folder, you don't need elevated permissions to make changes to it. If you use sudo, pip will make changes to your global site packages, not to your virtual environment, hence why you weren't able to install nump

Categories : Python

How to Install virtualenv on a machine without root access
The problem is you can't create a virtualenv if PYTHONHOME is set. If you're using a custom python build, you should install it (you can use --prefix to install it somewhere that doesn't need root access) and run: /path/to/install/bin/python virtualenv.py foo

Categories : Python

pip freeze does not show all installed packages
I just tried this myself: create a virtualenv in to the "env" directory: $virtualenv2.7 --distribute env New python executable in env/bin/python Installing distribute....done. Installing pip................done. next, activate the virtual environment: $source env/bin/activate the prompt changed. now install fabric: (env)$pip install fabric Downloading/unpacking fabric Downloading Fabric-1.6.1.tar.gz (216Kb): 216Kb downloaded Running setup.py egg_info for package fabric ... Successfully installed fabric paramiko pycrypto Cleaning up... And pip freeze shows the correct result: (env)$pip freeze Fabric==1.6.1 distribute==0.6.27 paramiko==1.10.1 pycrypto==2.6 wsgiref==0.1.2 Maybe you forgot to activate the virtual environment? On a *nix console type which pip to find out.

Categories : Python

What packages should be installed to use ALSA library?
ALSA should be part of a standard install. If I remember correctly the only library required is libasound (I've always assumed that stood for alsa sound). If you haven't seen it yet, this howto explains how to build on Linux. The example uses JACK. I believe JACK relies on ALSA as well. Using PortAudio in your Projects

Categories : C++

Meteor: How to list the installed packages
Update: as of meteor 1.0, the command is now meteor list I think the command you're looking for is meteor list --using

Categories : Node Js

How to list npm user-installed packages?
One way might be to find the root directory of modules using: npm root /Users/me/repos/my_project/node_modules And then list that directory... ls /Users/me/repos/my_project/node_modules grunt grunt-contrib-jshint The user-installed packages in this case are grunt and grunt-contrib-jshint

Categories : Node Js

How to use the default pip to install python packges to a specific virtualenv
You don't have to source a virtualenv to use it. Just install the package by executing the pip that is installed in the virtualenv: /home/guest/virtualenv/django-env/bin/pip install <package> You can also in earlier version of pip, run pip in another virtualenv than the one it's installed in with pip -E, like this: pip -E /home/guest/virtualenv/django-env/ But that really has no advantage over the above, and could cause errors, so the first option is still better.

Categories : Python

How to force virtualenv to install latest setuptools and pip from pypi?
It's not supported for security reasons. Using virtualenv.py as an isolated script (i.e. without an associated virtualenv_support directory) is no longer supported for security reasons and will fail with an error. Along with this, --never-download is now always pinned to True, and is only being maintained in the short term for backward compatibility (Pull #412). I can't use the --extra-search-dir option either because it's currently broken https://github.com/pypa/virtualenv/issues/327 Looks like the only option is to simply wait for the virtualenv maintainers to update the bundled packages?

Categories : Python

Haddock can't find the documentation for installed packages
If you use the Haskell packages provided by your distribution (which seems to be the case), then the documentation comes in separate packages. In your case, apt-get install haskell-platform-doc or just apt-get install ghc-doc should help.

Categories : Haskell

How do you find out which packages installed has `apache2` as its dependency?
RPM-based distributions allow this by a simple call of the basic rpm utility: rpm -q --whatrequires apache2 I am certain the apt package manager used in Ubuntu offers something similar. I suggest you read its man page...

Categories : Linux

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

install python module custom location, PYTHONUSERBASE / virtualenv
First of all, you need to add C:mysite to your PYTHONPATH. Then, when installing a new module, you do: PYTHONPATH=C:mysite python setup.py install --install-lib C:mysite Source: http://wiki.alwaysdata.com/wiki/Installing_a_Python_module

Categories : Python

Bash - how to check if packages can be installed, if apt-get/dpkg is running?
It depends how well you want to handle apt-get errors. For your needs checking /var/lib/dpkg/lock and /var/lib/apt/lists/lock is fine, but if you want to be extra cautious you could do a simulation and check the return code, like this: if sudo apt-get --simulate install packageThatDoesntExist then echo "we're good" else echo "oops, something happened" fi which will give for instance: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package packageThatDoesntExist oops, something happened

Categories : Misc

Determine list of non-OS packages installed on a RedHat Linux machine
yum provides some useful information about when & from where a package was installed. If you have the system installation date then can you pull out packages that were installed after that, as well as packages that were installed from different sources & locations. Coming at it from the other direction you can query rpm to find out which packages provides each of the binaries in /sbin /lib etc ... - any package that doesn't provide a "system" binary or library is part of your initial set for consideration.

Categories : Linux

Completely remove Android Studio, Eclipse and all the libs/packages installed with them
Removing Android Studio: Remove the Android Studio folder, usually in /home/[username]/android-studio Remove .AndroidStudioPreview from home/[username] Remove Eclipse from Software center.

Categories : Android

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

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

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

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



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