virtualenv

My Virtual Environment is using my System Python rather than my Venv's Python

。_饼干妹妹 提交于 2021-02-11 15:21:38
问题 I am following a tutorial on virtual environments (for Python) from the Coding Train (Here: https://www.youtube.com/watch?v=nnhjvHYRsmM). As I follow the tutorial, I see that, when which python is typed (in Terminal), the output should be the venv's Python in which it had installed. However, my system, for whatever reason this may be, decided to use it's own installed version of Python, instead. This means that all the dependencies (/modules) are screwed up and that I can't simply type out

After initiating a pybuilder project I receive an error that the executable is not functioning and that virtualenv is not compatible

戏子无情 提交于 2021-02-11 14:38:36
问题 I'm following the following helloworld tutuorial for pybuilder: https://pybuilder.io/documentation/tutorial I'm using a mac. I've installed python with brew. I'm able to run the following commands: $ virtualenv venv $ source venv/bin/activate $ pip install pybuilder $ pyb --start-project I create the helloworld file and run: $ pyb I get the following error: ERROR: The executable /Users/myusername/projects/learning/pybuilderexample/helloworld/.pybuilder/plugins/cpython-3.9.1.final.0/bin/python

After initiating a pybuilder project I receive an error that the executable is not functioning and that virtualenv is not compatible

依然范特西╮ 提交于 2021-02-11 14:36:05
问题 I'm following the following helloworld tutuorial for pybuilder: https://pybuilder.io/documentation/tutorial I'm using a mac. I've installed python with brew. I'm able to run the following commands: $ virtualenv venv $ source venv/bin/activate $ pip install pybuilder $ pyb --start-project I create the helloworld file and run: $ pyb I get the following error: ERROR: The executable /Users/myusername/projects/learning/pybuilderexample/helloworld/.pybuilder/plugins/cpython-3.9.1.final.0/bin/python

在virtualenv中使用Python 3

蓝咒 提交于 2021-02-11 02:27:53
问题: Using virtualenv , I run my projects with the default version of Python (2.7). 使用 virtualenv ,我使用默认版本的Python(2.7)运行项目。 On one project, I need to use Python 3.4. 在一个项目中,我需要使用Python 3.4。 I used brew install python3 to install it on my Mac. 我使用 brew install python3 将其安装在Mac上。 Now, how do I create a virtualenv that uses the new version? 现在,如何创建使用新版本的virtualenv? eg sudo virtualenv envPython3 例如sudo virtualenv envPython3 If I try: 如果我尝试: virtualenv -p python3 test I get: 我得到: Running virtualenv with interpreter /usr/local/bin/python3 Using base prefix '/usr/local/Cellar/python3/3.4.0_1

Pyenv: How to 'rebuild' virtualenvs after rebuilding python

孤人 提交于 2021-02-10 13:29:10
问题 I rebuilt python 3.7 to get pyinstaller to work on Mac, and it seems to have deleted all my virtualenvs using 3.7.0. The .python-version files still exist, and they point at the location I would expect. But when I run 'pyenv virtualenvs' there's no python3 environments at all, and in the project directory, the python command doesn't work at all. 3.7.0/envs/some-scripts``` ```$ ls ~/.pyenv/versions/3.7.0/envs/some-scripts/bin/ activate chardetect macho_find netaddr pydoc pyi-makespec python3

Python can't find packages in Virtual Environment

ぐ巨炮叔叔 提交于 2021-02-10 07:52:16
问题 I'm trying to setup my environment for a project but python isn't able to find the modules I've installed with pip. I did the following: mkdir helloTwitter cd helloTwitter virtualenv myenv Installing setuptools, pip, wheel...done. source myenv/bin/activate pip install tweepy Collecting tweepy Using cached tweepy-3.5.0-py2.py3-none-any.whl Collecting six>=1.7.3 (from tweepy) Using cached six-1.10.0-py2.py3-none-any.whl Collecting requests>=2.4.3 (from tweepy) Using cached requests-2.11.1-py2

Creating Virtual environment using python 3.8 when python 2.7 is present

时间秒杀一切 提交于 2021-02-09 01:55:34
问题 I am trying to create a virtual environment using mkvirtualenv with python 3 in Windows but the environment is created with python 2.7.My pip version is also from python 2.7 which i have avoided using py -m pip install virtualenvwrapper-win When i do mkvirtualenv test environment is created with python 2.7 Please help me with a solution Thanks in advance:) 回答1: If you would like to create a virtualenv with python 3.X having the version 2.X You just have to pass a parameter argument for your

Microsoft Visual C++ 10.0 required to install Python package in virtualenv

℡╲_俬逩灬. 提交于 2021-02-08 02:06:13
问题 I was trying to install the bokeh Python package via pip but I was thrown this error: error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat). I fixed that error by installing Microsoft Visual C+ and installed successfully after that. However, now I want to install bokeh inside my virtual environment which I created with virtualenv. My intent is to build a Flask app. I got the same error again, but this time I have no idea what to do. Any help would be greatly appreciated.

How to customize virtualenv shell prompt

一曲冷凌霜 提交于 2021-02-07 14:33:21
问题 How do you define a custom prompt to use when activating a Python virtual environment? I have a bash script for activating a virtualenv I use when calling specific Fabric commands. I want the shell prompt to say something like "(fab)" so I can easily distinguish it from other shells I have open. Following this example, I've tried: #!/bin/bash script_dir=`dirname $0` cd $script_dir /bin/bash -c ". .env/bin/activate; PS1='(fab) '; exec /bin/bash -i" but there's no change to the prompt. What am

Error with pointing to correct python version: virtualenvwrapper.sh

我与影子孤独终老i 提交于 2021-02-06 04:23:28
问题 I get this error when I boot up terminal: Last login: Thu Apr 9 19:49:08 on ttys001 /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named virtualenvwrapper virtualenvwrapper.sh: There was a problem running the initialization hooks. If Python could not import the module virtualenvwrapper.hook_loader, check that virtualenvwrapper has been installed for VIRTUALENVWRAPPER_PYTHON=/Library/Frameworks/Python.framework/Versions/2.7/bin/python