Compiling OpenCV 3.0 will create its own cv2.so file containing your new module, typically in your opencv3-0-0-beta/build directory. You need to add the OpenCV 3.0 build directory to PYTHONPATH instead of the one created by apt-get.

I ended up adding environment variable export something='something-else' commands to the activate file ~/.pyenv/versions/my_venv/bin/activate in the spirit of autoenv after reading this forum reply elsewhere.

It sounds like (because of which python not saying it's some shim) you don't have the bin/shims path first in your PATH envvar. Add these line to your shell startup script: export PATH="$HOME/.pyenv/bin:$PATH" eval "$(pyenv init -)" The eval line does some additional shell monkeying I think to add the...

pip when used with virtualenv will generally install packages in the path <virtualenv_name>/lib/<python_ver>/site-packages. For example, I created a test virtualenv named venv_test with Python 2.7, and the django folder is in venv_test/lib/python2.7/site-packages/django....

IIRC, CMD executes a separate shell so source wouldn't do what you need it to even if it did work. The source command reads and executes commands from the specified file. In the case of virtualenv it defines a bunch of environment variables, most notably, PATH. I believe that you...

You can run pip freeze -r requirements.txt which will preserve the order and contents of requirements.txt when pip is freezing the installed packages (including comments). However, it seems that your virtualenv does have MySQL-python installed so you'll end up with both a commented and uncommented line for MySQL-python. I think...

As the docs say: pip supports installing from Git, Mercurial, Subversion and Bazaar, and detects the type of VCS using url prefixes: "git+", "hg+", "bzr+", "svn+". pip requires a working VCS command on your path: git, hg, svn, or bzr. So, if you don't have a working git command on...

I don't know if it's possible to do it that way but you can build any version of python in your home drive that you can use for development. What you do need is the the development tools installed for your distribution ie GCC etc. Step 1 download the source...

No need to use sudo virtualenv Use only virtualenv Purpose of virtualenv is to get isolated python environment. When you are inside virtualenv don't use sudo pip / sudo pip3. Use pip without sudo. sudo pip is used to install python packages system wide. So, normal workflow is virtualenv --python=python3.4...

site-packages is located in the lib/python{major}.{minor}/ subdirectory of your virtualenv. e.g. in a Python 2.7 virtualenv: $ ls -d lib/python?.?/site-packages/ lib/python2.7/site-packages/ but in a Python 3.4 virtualenv the version number again matches: $ ls -d lib/python?.?/site-packages/ lib/python3.4/site-packages/ You can use: $VIRTUAL_ENV/lib/`$VIRTUAL_ENV/bin/python -c "import sys; print('python{0.major}.{0.minor}'.format(sys.version_info))"`/site-packages/ if you wanted an absolute...

Unless you intend to place your virtualenv into source control (which I would not recommend you do), there should be no interference whatsoever when using Git with an active virtualenv. If you do have your virtualenv folder set up within the project folder, add an entry in .gitignore to exclude...

Whenever I use cython I use the extension command. I would write the setup.py file as follows: from distutils.core import setup from distutils.extension import Extension from Cython.Build import cythonize print "hello build" extensions=[Extensions("helloworld",["helloworld.pyx"])] setup( ext_modules = cythonize(extensions) ) Hopefully this will then put the .so file in the current directory....

Since I don't have enough reputation to comment I'll simply attempt an answer as I think I know what the issue is. Firstly, if you could provide more details as to what you mean by "not working" I will edit my answer if need be and attempt to help more....

A user has the same problem as you. There is a known bug, that Python 2.7 isn't compatible with site.py. This bug is still open, since November 2012. You have to leave virtualenv or use another version of Python....

Ok after struggling with this for several hours, I figured out the problem. The error message is misleading. The problem is that I built a custom installation of Python 2.7.10 without having previously installed libbz2-dev. So the steps to fix this were: sudo apt-get libbz2-dev cd / ./configure --prefix= --enable-ipv6...

This should have thrown an error on your Ubuntu install as well. You need to change line 3 of projectName/main/admin.py to: from .models import ContactLink, ContactPost, Personnel, \ WorkCategory, Service, Skill, Work, Customer Notice the added dot . in the from .models part. The import should be relative (assuming all...

You can check for the environment variable VIRTUAL_ENV and see if it has the correct source path. Now if it doesn't exist then you know it's not activated. If it does, you need to check and see if it has the correct path. The correct bash snippet that will work...

Virtualenv won't really install a new python version from scratch, but rather copy one of the versions installed on your system. That's why you first need to get a python2.6 binary for Ubuntu 14.04. It seems they don't officially support python2.6 anymore, so either you manually download and install it...

Make a blank virtualenv. Try to run your program. If there is an import error, install the relevant package, then go to (2) again. You now have a virtualenv with just the packages that are required. Freeze that. ...

I see a few problems: Your requirements.txt is for the base system Python, not any virtual environment. Django does not have any external dependencies. You are using the root user to install packages in your virtual environment (or you are using sudo when you shouldn't). The best option is to...

Ok so this was a pain, I found out the hard way that virtualenv doesn't like Windows. Here's how I fixed the problem: First I needed to directly download the mktemp.exe for MSYS and place it in the corresponding Git/bin directory, my main problem had to do with GitBash didn't...

Pyenv and virtualenv are very different tools that work in different ways to do different things: Pyenv is a bash extension - will not work on Windows - that intercepts your calls to python, pip, etc., to direct them to one of several of the system python tool-chains. So you...

PATH is not the first place where CreateProcess() used by Popen() on Windows looks for the executable. It may use pip.exe from the same directory as the parent python.exe process. The shell (cmd.exe) uses different rules. See Popen with conflicting executable/path. To avoid the dependency; use the explicit full path...

The pip program what you are using corresponds to the Python 2.7 version. You need to use the pip which corresponds to Python 3.x. So, you should be using pip3 install virtualenv Alternatively, you can create virtual environments in Python 3.3+ with the venv module, like this python3 -m venv...

When you type ./[tab] and the file you're expecting doesn't come in linux shell, chances are you need to make the file executable: sudo chmod a+x manage.py Or you don't have sufficient permissions to access the file: sudo chown user:group manage.py (Be careful with the last one because it may...

In the first case you seem to be launching some kind of global (maybe one installed with sudo pip) uwsgi, as indicated by output: detected binary path: /usr/local/bin/uwsgi It may be missing python3 plugin to properly switch environments, and in general I found it is always simpler to use uwsgi...

Based on Chris's answer, the solution how to restart supervisord program without sudo permission: You have to edit supervisord.conf to change socket permissions (in my case located at /etc/supervisor/supervisord.conf] [unix_http_server] file=/var/run//supervisor.sock ; (the path to the socket file) chmod=0766 ; sockef file mode (default 0700) Then you have to make...

As far as I know it is possible to run your script/project using your virtualenv simply by calling /path/to/your/venv/python your_script.py. To install new packages in your venv for example, you would run /path/to/your/venv/pip install some_package. I guess the main advantage of "runnnig inside virtualenv" would be not being concerned about...

I always use pip install --user packagename – it doesn't require sudo. If you don't have pip yet, or either OS's pip or OS's easy_install doesn't work properly, first install setuptools in user's home directory, and then use its easy_install for pip. $ wget https://bootstrap.pypa.io/ez_setup.py -O - | python3 -...

The ST3 build system and the SublimeREPL are provide two different pieces of functionality. The build system is something you would typically use when working with a compiled language like C. It allows you to define how you want to build your program from the source files. You can also...

The normal thing to do is to put the requirements.txt file in the the root of your application source code. This way you can place it under version control with the rest of your application artifacts. That's what virtualenvwrapper expects you to do. It's why virtualenvwrapper distinguishes between the directories...

If you're working on a pair of related projects where one depends on the other, you can just uninstall the "remote" version and use pip install -e to install it from your local copy in editable mode. This will let your dependent project see it, and automatically see changes to...

Canopy is built on a backport of Python 3's venv. Therefore virtualenv cannot be used in Canopy Python. Most virtualenv users should be able to use venv in its place, without difficulty. However we recognize that this does pose problems for some users. Therefore the next major release of Canopy...

Edit, after discussion: "I want all paths outside my virtualenv (/usr...) to be below the paths of the virtualenv. [...] It needs to be sorted." Then, just sort your sys.path before the first import happens. Given a certain path prefix corresponding to the location of your virtalenv, this approach likely...

Found the solution! I think it was improper of my to install mysql-devel in the first place, so I went ahead and uninstalled it. Instead, I used a packaged supplied by Percona - Percona-Server-devel-55 yum install Percona-Server-devel-55 and the problem is solved!...

You should never do this - pip doesn't have dependency resolution so there's no guarantee that you'll get a certain version. Dependencies should be installed using setup.py, requirements.txt or a different approach. You also shouldn't need user permissions or sudo to install the packages just for running the code. The...

You can install scipy using pip in your virtualenv with pip install scipy pip should install all Python dependencies necessary before installing scipy. Note that you may have to install some extra non-Python dependencies using apt-get. These will be flagged as errors during the pip installation if they're necessary. Possible...

Running source bin/activate will set the PATH variable to point to your environment bin directory which is useful if you have other command line scripts/binaries installed (this can happen with certain python packages that add shell commands), it will also unset/set PYTHONHOME. So, if bin/python works for you then you're...

No, they won't clobber one another, any more than one alone will clobber itself. You may see warnings about hooks, but that shouldn't be a big deal. Fundamentally it's virtualenv that does the relevant work, not its wrappers. But I recommend using just pew over virtualenvwrapper. (Here's why.)

You should only transfer a requirements.txt file that has a list of your installed libraries from pip freeze and never transfer the virtual environments themselves. I would delete the virtual environment and create a new one. Then from the new one make sure you install all the required dependencies. virtualenv...

You don't have installed underlying ta-lib library. You can find more info on the project site https://github.com/mrjbq7/ta-lib : Sometimes installation will produce build errors like this: func.c:256:28: fatal error: ta-lib/ta_libc.h: No such file or directory compilation terminated. This typically means that it can't find the underlying TA-Lib library, a dependency...

If you want to use Python 3 for your app component, and have that component started by Crossbar.io, that means you want a guest worker. The way to configure the executable run for the guest worker (which would be Python 3 in your case), is indeed by using the executable...

I needed to specify the full path of virtualenv: C:\virtualenvs>C:\python34\Scripts\virtualenv.exe -p C:\Python34\python.exe because I was effectively calling this: C:\virtualenvs>C:\python27\Scripts\virtualenv.exe -p C:\Python34\python.exe since C:\python27\Scripts is in my PATH. And the collision of Python 2.7 and 3.4 was causing the issue....

Long story short, it sets your path environment variables so it knows to check for installed packages in your virtual environment directory, so you don't have to do things like install them in a directory which you don't have (sudo) access. i.e. you can do pip install without sudo and...

Thanks to pointers from @Barun Sharma, I could fix this. Initially I had created a virtual environment in the directory ~/projectname. Later I decided to move it to under ~/virtualenv. This would result in a stale path ~/projectname in $PATH variable. Updating VIRTUAL_ENV to the latest path in /bin/activate solved...

You shouldn't look at a virtual environment as an obstacle, instead it should be the cornerstone of your Python development experience. Virtual environments allow you to isolate your python packages from the system's packages in a local location and destroy it and recreate it to your hearts content. The problem...

It's best to install packages within a virtualenv as much as possible (for applications or projects that you're working on). This keeps the dependencies separate and as such you should only install things globally when that's appropriate (but often it's not because a dependency is specific to a project)....

Don't use sudo to call pip when you're in a virtualenv: the root user won't have the virtualenv activated so the package is installed globally, as you can see from the paths. Just run pip install tweepy.

Why not just use VirtualBox to virtualize a 32 bit Kubuntu whenever you want to develop in 32 bit Python. That way you have the best of both worlds: your 64 bit system for normal use and a 32 bit system that you can fire up whenever you need it...

On top of what Othman said, virtualenvs are simply not portable. Trying to move it will break it, and it's easier to create a new environment than to fix it. So, even on deployment platforms that do use virtual environments, checking them in to git is not going to work....

On Linux systems, additions for specific sites are generally never stuck in the httpd.conf file. Instead they would be in separate files for each site under a sites-available directory, which in turn would be symlinked into a sites-enabled directory. The main Apache configuration files would then use the Include directive...

No, anything that can be generated should not be included. Dependencies should be managed with something like pip, and the requirements.txt file can be included. The only files under source control should be files you absolutely need to get you development environment going. So it can included boot strapping of...

You have to activate the virtualenv in every shell, or, as 0range suggested, activate it in your .bashrc or any script running before your shell displays the prompt. To add it to your .bashrc : Edit /home/youruser/.bashrc and add the line : source /path/to/bin/activate Open a new shell or source...

You should just start it in the main virtualenv directory. You certainly shouldn't remove any of those subfolders: you need them for the correct functioning of the virtualenv and the code it contains....

A few misconceptions here: By using sudo pip install you're not using a virtualenv; you're installing those directly to your machine. You have to create the virtualenv and then activate it via source venv/bin/activate. Once it's activated, be sure that pip is installed. Then, you will be installing your packages...

The ubuntu user does not have root permissions without sudo, no. This is the way ubuntu recommends it. As you've observed using sudo in a virtualenv does not work the way you'd expect it to. If you're creating a virtualenv somewhere that requires root access to modify, use su when...

I used python setup.py install &> ~/error.txt to pass on the error messages to knowledgeable colleague who identified that C compilation was using the -Werror=format-security flag. This version of wxPython (and maybe others) cannot compile with that flag. My $CPPFLAGS and $CFLAGS environment variables were empty. It turns out that...

Invoke django-admin.py like this python django-admin.py, in your activate virtualenv. Alternatively you can do /path/to/virtualenv/bin/python django-admin.py. The best solution is probably adding a shebang to django-admin.py that looks like #!/usr/bin/env python which should use the python interpreter of your active virtualenv. See http://stackoverflow.com/a/2255961/639054

I was in a situation similar to yours, and I eventually found the fix. At least in my case the root problem was that when I compiled python 2.7.8 the build process didn't find the proper OpenSSL libraries (because they were not installed on my system). After make finished running...

ln /usr/bin/ffmpeg /home/www/env/bin/ffmpeg will create a link in a folder already in the workers PATH, alternatively you could add /usr/bin to the workers PATH eg environment=PATH="/home/www/env/bin:/usr/bin" ...

Your question lacked the full python traceback so I can only answer this based on my understanding. The fact that your cwd (and thus pythonpath) contains a mako.py file is where you're getting tripped up. Try renaming it, and removing the mako.pyc in your home dir first, then re-running this....

You can write an activation script that sources virtualenv's activate (on linux, or calls the bat file on windows) and then updates PATH, PYTHONPATH and other environment variables. Use the virtualenv bootstrap hooks to install the script when the virtualenv is created and call it instead of activate.

Navigate to the Scripts folder inside your virtual environment. Activate the environment by entering activate.bat Download the 64bit version of pycrypto found here Copy the pycrypto .exe file to the Scripts folder of your virtual environment. Install it by entering easy_install <name_of_your_pycrypto_install_file>.exe The answer was found by looking at...

If they had activated the Python 3 virtual environment and its bin directory was in there path, then likely they could simply run 'pip' rather than 'pip3'. You should run 'which pip' to verify whether it was coming from the virtual environment you expect. The 'mod_wsgi-httpd' package is specifically for...

I found my way around it. I noticed it installs successfully globally. So I installed psycopg2 globally and created a new virtual environment with --system-site-packages option. Then I installed my other packages using the -I option. Hope this helps someone else. OK. I later found out that I had no...

Use a setup.py and list the dependencies in install_requires. Now to the part "How to distribute this?" In our company we run our own pypi server. Every package that gets installed on our servers must be from our pypi server. No software gets downloaded directly from the internet to the...

You can activate your virtualenv and then start server using a bat file. Copy this script in to a file and save it with .bat extension (eg. runserver.bat) @echo off cmd /k "cd /d C:\Users\Admin\Desktop\venv\Scripts & activate & cd /d C:\Users\Admin\Desktop\helloworld & python manage.py runserver" Then you can just run...

This is probably related to how Windows maps extensions to executables. You started the script with bank_app, which is really not the name of your script (your script has a .py extension I assume?). Windows must be doing a search in your directory, and then starting the script with the...

When you use virtualenv, pip install will save the package into the virtual environment site-packages directory. Additionally, if you use virtualenvwrapper, you can use cdsitepackages command to change to site-packages directory . then you cd oscar from there. In my case, django-oscar is located under: /home/myname/.virtualenvs/myprojectenv/lib/python3.4/site-packages/oscar/ But you are not...