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

Python deployment with virtualenv (on a no-internet-access server)
Three options I would consider: Run your own PyPI mirror with the dependencies you need. You really only need to build the file layout and pull from your local server using the index-url flag: $ pip install --index-url http://pypi.beastcraft.net/ numpy Build virtualenvs on the same architecture and copy those over as needed. This works, but you're taking a risk on true portability. Use terrarium to build virtual environments then bring those over (basically option 2 but with easier bookkeeping/automation). I've done all of these and actually think that hosting your own PyPI mirror is the best option. It gives you the most flexibility when you're making a deployment or trying out new code.

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

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

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

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

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

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

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

"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

Installing R on RHEL 6
Try this one rpm -ivh http://mirror.unl.edu/epel/6/x86_64/epel-release-6-7.noarch.rpm The second is: #yum install R Thanks & Regards, Alok

Categories : Linux

How to install active python in virtual environment on centos
You can tell to virtualenv where is your python interpreter Usage: virtualenv [OPTIONS] DEST_DIR Options: --version show program's version number and exit -h, --help show this help message and exit -v, --verbose Increase verbosity -q, --quiet Decrease verbosity -p PYTHON_EXE, --python=PYTHON_EXE The Python interpreter to use, e.g., --python=python2.5 will use the python2.5 interpreter to create the new environment. The default is the interpreter that virtualenv was installed with

Categories : Python

Getting a Python Virtual Environment, Fabric and Sudo to Work Together
Replace source with /bin/bash/. Here's an example: from fabric.api import * def init(): local('virtualenv --no-site-packages venv') venv_command = '/bin/bash venv/bin/activate' pip_command = 'venv/bin/pip install mysql-python django South' local(venv_command + ' && ' + pip_command) FYI, for run/sudo it's better to use prefix context manager, like suggested here. Hope that helps.

Categories : Python

Installing hadoop on RHEL with Oracle11G
The database (Oracle in your case) will be only on one node, but the metastore accessing it can either be embedded, local, or remote. See: http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/latest/CDH4-Installation-Guide/cdh4ig_hive_metastore_configure.html

Categories : Database

Error installing matplotlib - python2.7 (RHEL 5.9)
Looks like your system doesn't have freetype-devel installed. Try sudo yum install freetype-devel first. In addition you may need to install libpng-devel, sudo yum install libpng-devel

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

python | heroku | how to access packages over ssh
I had the same issue before I wanted to use django-avatar and the version in PyPI is old and doesn't support Django 1.5 Custom User . The simple solution is to download the package and use it as a regular app as if it was part of your project then just git add . and push it and it works ! It might not be the best idea but it just works .

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

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

Installing Flask with Virtualenv
You need to source the bin/activate script first in the new flask folder to activate the virtualenv. If you are running bash (most likely) then run: cd new/flask/directory . bin/activate pip install ... When you want to get out of the virtualenv, you can quit the terminal tab, or run: deactivate Note that when you activate a virtualenv, it only is active in the one terminal tab you are in. If you don't run that command first, then pip will try to install into your system directories, thus giving the permission errors you are seeing.

Categories : Python

mod_wsgi does not find environment variable in virtualenv
I use nginx and uwsgi on Ec2 and have a chef recipe that builds out my servers. To solve this problem, in chef I have roles that contain credentials not stored in the app's repo. file at /home/user/web/site/environment that chef creates based on roles. MYSQL_DATABASE=databasename MYSQL_USER=databaseuser MYSQL_PASSWORD=databasepassword MYSQL_HOST=databaseip MYSQL_PORT=3306 REDIS_HOST=redishost REDIS_PASSWORD=redispassword REDIS_PORT=6379 REDIS_DB=0 MEDIA_ROOT=/home/user/web/site/media STATIC_ROOT=/home/user/web/site/static at the beginning of my production/staging/etc settings file I have the following block to read the environment file import os, re try: dirname = os.path.dirname(os.path.abspath(__file__)) # my environment file is always in the same place relative to my pr

Categories : Python

Installing msi files into virtualenv pythons on windows
You don't need to manipulate the registry because you can use binary installer (.exe) to install Python package into virtualenv. See Can I install Python windows packages into virtualenvs? for details.

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

No internet access on Android Emulator, Shared Internet Connection
Finally I sorted out my problem. It was problem due to dns server address. I did below steps open CMD Goto your android-sdk/tools path, Like my path is G:Andriod Developmentandroid-sdk ools type this command G:Andriod Developmentandroid-sdk ools>emulator.exe -avd Android_2.3.3 -dns-server 8.8.8.8 -scale 0.75 here Android_2.3.3 is your AVD name, -dns-server 8.8.8.8 will set your DNS address to 8.8.8.8 or 8.8.8.8:55 and -scale will scale your AVD to specified value. this will start a new emulator. Enjoy :) Hope may be helpful to others

Categories : Android

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

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

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

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

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

MySQL and virtual environment
As long as your MySQL deamon is in the PATH, there should not be any trouble. (the virtualenv just add a PATH entry to influence binary resolution but does not remove any PATH entry) Try to check what a gives you out : which MySQLdb if there is no output then there is a MySQL installation problem. BTW how did you install MySQL : did you use homebrew (or another package manager) or did you use a dmg image ?

Categories : Python

Python3 Virtual Environment and PIP
this works for me: > virtualenv-3.3 env ... > source env/bin/activate > pip install simple-date ... > python Python 3.3.0 (default, Mar 27 2013, 20:56:52) [GCC 4.7.2 20130108 [gcc-4_7-branch revision 195012]] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import simpledate >>> unfortunately, i'm not completely sure how i installed virtualenv-3.3 back in the day. i think i probably did something like: > wget http://python-distribute.org/distribute_setup.py > python3.3 distribute_setup.py > easy_install-3.3 virtualenv [edit: yes, that seems to be confirmed by my notes at http://www.acooke.org/cute/GettingPyt0.html ] note that is then a python-3.3 specific virtualenv. as described in the comments, i could no

Categories : Python

Setting up virtual environment in PyCharm
In settings, under the Project section (in the left pane) go to Interpreters. From there you can select a found environment or click the + to add your own from a path. Find the environment you created and add it to the list. Then, once you select the environment you can see the installed modules underneath. You can add new modules through their built in pip. After that, it'll take you to the first page where you have to select your custom environment from a drop down. Good luck! Edit: Reread your question. Sometimes when I can't get the module to be recognized in PyCharm, I do a pip install through the command line in the virtual environment. Then restart PyCharm. Navigate to the environment in cmd and run python -m pip install -U SOUNDCLOUD_MODULE and it'll work.

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

installing android x86 in a virtual machine
check here www.bitdirect.nl/?p=128 I followed this with a few little tweaks here and there and it worked perfectly. only downside is transferring data outside of the android os is a pain.

Categories : Misc

How to install Django using source code in virtual environment?
You can do it like this: First Activate your virtual environment cd into the project folder then do python setup.py install FYI you can use pip to install django. pip install Django

Categories : Python

How to setup virtual machines on cloud for testing environment
Ok. There are different ways to do what you want, using TestNG. I am going to provide a brief overview of each, as there is lots of documentation on how to do them. The first is to use @Factory, and instantiate a new class for each driver. The second is to use @Dataprovider and pass in a driver to your methods. This has the flexibility of being parallel. With the actual task of instantiating each of your drivers...there are plenty of resources on doing that.

Categories : Testing

preventing addition of system Python path to virtualenv easy-install.pth by python setup.py develop
When you do python setup.py develop That ^ python that you are using to run setup.py is not necessarily associated with the virtual environment. You need to ensure that you are running the virtualenv's version of python by navigating directly to python.exe in your virtual environment and using that to run setup.py. Alternatively you can just call activate.bat in your scripts folder and it will do it all for you, ensuring that nothing outside of the virtual environment is used. edit if you are certain that you are using the virtualenv's python.exe please ensure that when you created the virtual env you used the --no-site-packages flag virtualenv --no-site-packages myEnv edit2 the --no-site-packages seems to have been OP's problem

Categories : Python



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