Comments (6)
The message of "Could not find an activated virtualenv (required)." must be displayed by pip
during execution of pip install virtualenv
in pyenv virtualenv
. Do you set require-virtualenv
or require-venv
as a default option for pip
in ~/.pip/pip.conf
or somewhere?
from pyenv-virtualenv.
No I did not. I do not recall seeing anything in the documentation.
Is it something I should set? in `~/.pip I only have a 'cache' directory and 'pip.log'
I do not see pip.conf
from pyenv-virtualenv.
I do have this setting in .bashrc:
# PIP
# pip should only run if there is a virtualenv currently activated
export PIP_REQUIRE_VIRTUALENV=true
# cache pip-installed packages to avoid re-downloading
export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache
It that causing the problem? This may of been added when the regular virualenv was added.
C.
from pyenv-virtualenv.
Looking at this a bit more I think the problem started with the pyenv install.
I had previously installed python with brew. Along with virtualenv and virtualenvwrapper.
I was trying to figure out how I could have a certain python version set to a specific project and stumbled across pyenv.
To use pyenv I uninstalled python brew uninstall python
and then reinstalled with with the pyenv command: pyenv install 2.7.6
This option was set in .bash_profile:
export PYENV_ROOT=/usr/local/opt/pyenv
So I assume that pyenv used that directory as opposed to the ~/.pyenv directory
Could that be causing the problem? Should I comment that line out and reinstall the python versions?
Also the other virtual env variables in .bash_profile are:
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Repo
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
Is pyenv virtualenv using the standard environment variables above?
I guess VIRTUALENVWRAPPER_PYTHON
needs to be set to something different since python does not live in that area anymore, but I do now know what to set it to - or if I even need this variable.
Here are the PIP settings in .bashrc:
# PIP
# pip should only run if there is a virtualenv currently activated
#export PIP_REQUIRE_VIRTUALENV=true
# cache pip-installed packages to avoid re-downloading
export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache
As I mentioned I'm pretty new at this and since I've not been able to find one good source of information, I've tried to piece this together from many sources. To be honest I'm still not 100% clear on how this is all supposed to work. Getting good documentation for a beginner seems hard. All the documentation seems to assume we already know how it is supposed to work.
I guess an other option it to just remove all this stuff and go back to using brew for the python installs?
Please advise,
Carolyn
from pyenv-virtualenv.
The pyenv-virtualenv
uses vanilla virtualenv
to manage virtual environments as a version of pyenv
.
The following environment variables are not the standard of virtualenv
in any senses. These environment variables are just for virtualenvwrapper
, and have no effects for virtualenv
. The pyenv-virtualenv
just ignores them because it doesn't depend on virtualenvwrapper
.
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Repo
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
from pyenv-virtualenv.
OK - thanks, I'll give this a try.
from pyenv-virtualenv.
Related Issues (20)
- Activate virtualenv: Example
- `pyenv virtualenvs` failure on macOS Big Sur HOT 1
- Something like virtualenv-clone HOT 7
- [FR] Local virtualvenvs + registering them / using them through `.python-version` HOT 14
- Force creating venv with same name doesn't update Python version
- Set CONDA_PROMPT_MODIFIER env var when activating conda environment HOT 5
- Env's name disappears from the prompt when spawning a subshell HOT 6
- python3-config (along with other tools) does not respect the version virtualenv hook on HOT 6
- pyenv deactivate doesn't deactivate env HOT 1
- pyenv virtualenv does not correctly link the c++ libraries associated to the python package
- New release? HOT 3
- Latest version HOT 1
- Incorrect version reported by `pyenv virtualenv --version` HOT 1
- Cannot create new virtualenv with "system" Python if it's 3.11+ HOT 1
- Hooks for virtualenv-delete HOT 1
- Hooks don't work under /usr/share/pyenv/plugins
- Virtualenv not isolated HOT 1
- Don't use `.python-version` for auto-activation HOT 3
- "tox: command not found" despite tox being present in the active environment HOT 1
- Unable to use `venv/bin/activate` when the virtual environment of pyenv-virtualenv is set. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyenv-virtualenv.