w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
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

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

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

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

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

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

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

Installing Python Packages - IronPython
You have to run IronPython with the command line option -X:FullFrames. I'm not sure, though, how to set that up in the VS. Maybe you can manually run it: C:path oipy64.exe -X:FullFrames path opip.py install whaterver_you_want

Categories : Python

Installing python packages in nitrousio
You could try pip install --user praw https://pip.pypa.io/en/latest/user_guide.html#user-installs

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

Installing new packages in Meteor
You haven't deployed anything. You have just installed meteor on your local machine. You are going the right path, now you need to clone the repository so pop open the console and type: git clone https://github.com/gmanricks/Meteor-Schedule-Example.git That will create a directory so you cd into it and type meteor run and there you have the app working locally, now if you want to deploy to meteor servers you can do: meteor deploy meteor-scheduele-or-whatever.meteor.com Best regards.

Categories : Javascript

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

Installing packages within canopy venv
Yes, you just need to install setuptools and pip into your venv. If you use the -s/--system-site-packages option, you can inherit these from Canopy's installation (you may need to manually install the pip package using the package manager before making your venv). Appropriately-modified copies of the easy_install and pip scripts will be installed into your venv and will install into your venv's site-packages.

Categories : Python

Installing/upgrading/uninstalling packages using git
This is a very generic answer, since the workflow usually depends on what the repo maintainer specified, but in general: git clone to install is fine git pull to update the repo usually works, unless you want to check the updates before you merge them, in which case you should git fetch. There's good info on fetch vs pull here rm -rfing the repo directory should work to remove the repo (of course, anything you built will need to be removed separately)

Categories : GIT

Dependency error in installing packages in R
Installing the plyr package won't make a lot of difference since pROC is not supported for your R distribution. Also since you use Rstudio you might find it easier to install packages via Tools>Install Packages and then set Install from: to Repository(CRAN). That way you don't have to manually download them. As an alternative to pROC you can maybe use ROCR. Also this might be of interest if you were planning to use pROC to calculate the area under the curve, anyway I'm digressing.

Categories : R

Installing packages on R fails when loading .Rprofile
I figured out the lines in my .Rprofile that were causing the problem, though I don't know why they were causing the problem. The .First and .Last functions were these: .First <- function() { utils:::loadhistory(file = "~/.Rhistory") cat(" Successfully loaded .Rprofile at", date(), " ") } .Last <- function() { utils:::savehistory(file = "~/.Rhistory") } Commenting out the lines about saving and loading history let me install packages.

Categories : R

Does Azure Point-to-Site or Site-to-Site VPN support cloud services?
I haven't tried personally, but you should be able to do just that by joining your cloud service to a virtual network. See this article for details on how to do this: http://convective.wordpress.com/2012/08/26/windows-azure-cloud-services-and-virtual-networks/.

Categories : Azure

/usr/local/lib/python2.6/dist-packages/joblib/parallel.py:40: UserWarning: [Errno 30] Read-only file system. joblib will operate in serial mode
You need to change the permissions for the directory the process wants to write to. Find out what directory joblib wants to put things in and change its permissions or use a different directory with the needed permissions for this. In order to be able to give the permissions and to allow Python to write to the filesystem, it must be mounted in a way that allows writing.

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

out of memory issue in installing packages on Ubuntu server
Extend your RAM by adding a swap file: http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/ a swap file is a file stored on the computer hard drive that is used as a temporary location to store information that is not currently being used by the computer RAM. By using a swap file a computer has the ability to use more memory than what is physically installed in the computer http://www.computerhope.com/jargon/s/swapfile.htm In Short: Login as root: su - or execute the commands with sudo in front dd if=/dev/zero of=/swapfile1 bs=1024 count=524288 mkswap /swapfile1 chown root:root /swapfile1 chmod 0600 /swapfile1 swapon /swapfile1 Now the swap file will be activated temporarily, but will be gone after reboot. You should have enough RAM for your installing process T

Categories : Python

Android Studio for Windows is not installing and updating packages
You can check the "log window" to get more information about the problem. There is a icon in the bottom left of the SDK Manager to access to the log. Anyway, the most usual problem is that you probably are not running Android Studio as administrator so it can't create new folders. Try to run Android Studio as administrator and it should work.

Categories : Android

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

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

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

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

Connect azure web site to on-premise database over site-to-site vpn
Azure Web Sites do not support the Azure Virtual Network (as of 8/22/2013); http://www.windowsazure.com/en-us/manage/services/web-sites/choose-web-app-service/ You will need to create a cloud service deployment instead if you would like to use Virtual Network and access the on-premises database. Once that is done and your firewall is properly configured, it is like you say just a connection string.

Categories : Database

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

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

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

`mrt add` throws unknown error when installing Atmosphere packages with Vagrant on Windows
I think that's the problem. Meteorite 0.6.0 uses symlinks but Windows can't handle it. Try copying the sass folder into packages instead of making them symlinks. Some packages you will need to copy with cp -rL

Categories : Meteor

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

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

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

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



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