virtualenvwrapper

Wrong python packages path for opencv cmake installation

99封情书 提交于 2019-12-06 03:59:48
问题 I've been trying to follow the opencv installation steps from pyimagesearch.com with virtualenv. Everything works fine except for the packages path: it should be /Users/JLee/Envs/cv/lib/python2.7/site-packages but it's configured as lib/python2.7/site-packages In Python, import cv2 works well in the global setting but doesn't work in the 'cv' virtual environment. While following the steps from the site, I first proceeded without installing virtualenv, then realized I haven't installed it so I

Why does virtualenv inherit $PYTHONPATH from my shell?

末鹿安然 提交于 2019-12-06 01:41:34
问题 So I'm migrating all my tools from python2 to python3.4 on an Ubuntu 14.04 machine. So far I've done the following: aliased python to python3 in my zshrc for just my user installed pip3 on the system itself (but I'll just be using virtualenvs for everything anyway so I won't really use it) changed my virtualenvwrapper "make" alias to mkvirtualenv --python=/usr/bin/python3 ('workon' is invoked below as 'v') Now curiously, and you can clearly see it below, running python3 from a virtualenv

workon command doesn't work in Windows PowerShell to activate virtualenv

偶尔善良 提交于 2019-12-06 01:37:21
问题 I have installed virtualenvwrapper-win and when I try this command workon <envname> In CMD it works, but not in Windows PowerShell. In Windows PowerShell I have to do Scripts\activate.ps1 and then I get the envname before the prompt. Can you please let me know how can I make workon command working in PowerShell? 回答1: workon is a batch script. If you run it from PowerShell it's launched in a new CMD child process, doing its thing there, then exit and return to the PowerShell prompt. Since

differentiate mkvirtualenv and mkproject for virturalenvwrapper

萝らか妹 提交于 2019-12-05 15:01:11
I am talking about Doug Hellman's virtualenvwrapper . Well, as per him, once we install virtualenvwrapper, we should edit the .bashrc file as explained here what we do is we add the following three lines of code: export WORKON_HOME=$HOME/.virtualenvs export PROJECT_HOME=$HOME/Devel source /usr/local/bin/virtualenvwrapper.sh where .virtualenv is the directory where the venvs would be placed. Devel is the directory where the code will reside. Observation 1: when i do mkvirtualenv proj1 what happens is a directory called proj1 is created inside .virtualenv but NOT inside Devel. Observation 2:

Where to define the postactivate hook with virtualenvwrapper-win?

微笑、不失礼 提交于 2019-12-05 06:54:58
I'm using virtualenvwrapper-win and want to use the postactivate hook of virtualenvwrapper to set environment variables. However it seems virtualenvwrapper-win doesn't include a postactivate file, and I haven't been able to get it to work by creating my own. Does anybody know how to get the postactivate hook to work with virtualenvwrapper-win? I want to include this in postactivate to set an environment variable: SET APP_SETTINGS="example.setting" I actually solved it myself. You can put any environment variables in the activate.bat file in the Scripts folder of your virtualenv. Dan Cohen If

'Permission denied' error when using pip install in virtualenv

北城以北 提交于 2019-12-04 17:45:41
问题 Edit: FIXED! Just had to chown the .cache directory I've tried the virtualenvwrapper docs instructions, I've tried this guy's instructions as well as these...I've tried sudo pip uninstall virtualenv , sudo pip uninstall virtualenvwrapper , sudo pip3 uninstall virtualenv , sudo pip3 uninstall virtualenvwrapper before attempting each set of instructions. I've looked at other SO posts like this one, but the sudo issue isn't the same as my own. By this, I mean that I don't use sudo when making

Sharing Python virtualenv environments

五迷三道 提交于 2019-12-04 16:59:52
问题 I have a Python virtualenv (created with virtualenvwerapper) in one user account. I would like to use it from another user account on the same host. How can I do this? How can I set up virtual environments so as to be available to any user on the host? (Primarily Linux / Debian but also Mac OSX.) Thanks. 回答1: Put it in a user-neutral directory, and make it group-readable. For instance, for libraries, I use /srv/http/share/ for sharing code across web applications. You could use /usr/local

Virtualenvwrapper creating project in wrong directory?

一曲冷凌霜 提交于 2019-12-04 16:56:47
I'm extremely new to Python and virtualenv, so I apologize if this is an obvious question. I've got a C drive and a D drive on my pc running windows 10. I have the python and scripts path set to the proper location on the D drive. In console, i did a pip install virtualenv and pip install virtualenvwrapper-win . After that i navigated to a folder on my D drive where i want my projects. When I ran mkvirtualenv HelloWorld , it seems to have created the virtualenvironment in my C:/users/me folder. Additionally, the virtual env was not activated by default and I was not moved to the correct

how can I find the path of virtualenv python

主宰稳场 提交于 2019-12-04 16:29:28
how can I find the path of virtualenv python ,built with this tutorial? (i want to find python in this env and use it in my eclipse) $ sudo pip install virtualenv virtualenvwrapper $ export WORKON_HOME=$HOME/.virtualenvs $ source /usr/local/bin/virtualenvwrapper.sh $ echo -e "\n# virtualenv and virtualenvwrapper" >> ~/.bashrc $ echo "export WORKON_HOME=$HOME/.virtualenvs" >> ~/.bashrc $ echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc $ source ~/.bashrc $ mkvirtualenv cv -p python3 You can use which to find out which binary will be executed... For example: $ which python3 /home

What's the relationship between environments and projects in virtualenvwrapper?

大兔子大兔子 提交于 2019-12-04 16:28:12
问题 In other words, what's the difference between the mkvirtualenv and mkproject commands? I have a workflow that looks like this: /dev projectA appA appB projectB appA appB All of the apps share some resources (like South, pep8, etc.), but other resources are specific to each app. Should I be using virtualenvwrapper "projects" to keep these dependencies separated? 回答1: From my understanding of the documentation, mkvirtualenv projectenv simply creates a new virtual environment named projectenv in