Questions tagged [virtualenv]

virtualenv is a tool that creates sandboxed Python environments.

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

Is there a way to install Unix packages and tools in an env, similar to how Conda works?

When working with Python projects, I can use Conda to create new environments in which I can install all the libraries I need for that particular task. This way, when I finish the project, I can ...
user avatar
0 votes
0 answers
8 views

Automating virtualenvwrapper - and what is formally the mkvirtualenv call?

virtualenvwrapper is a good help. I can't though understand: What are these shell shortcuts makevirtualenv, workon and so on exactly - they do not see to be scripts/aliases? How to automate calling ...
user avatar
  • 451
0 votes
0 answers
26 views

Philosophy of virtualenv

Can somebody explain the philosophy of virtualenv? I fully understand how it works - if I use scripts by hand. I've to enter to some folder, run virtualenv and do what I want in secure environment. ...
user avatar
1 vote
0 answers
71 views

Unable to set python environments with old interpreters

I have installed virtualenvwrapper on Arch Linux, as well as the AUR repository python38 so I can set an environment and work with TensorFlow. I have set up .bashrc as usually recommended on the docs ...
user avatar
0 votes
1 answer
58 views

User and virtual environment in ubuntu linux

Hi I'm new to linux and currently I'm using ubuntu as my linux distribution. Right now I'm confused about user in ubuntu and search online about it. I found article about it in digital ocean that says ...
user avatar
0 votes
0 answers
205 views

How can I customize the virtualenv info in zsh theme?

I use the bureau theme (little customized) with oh-my-zsh. .zshrc file zsh-theme file p0tt3r@wand ~ [21:19:10] () >🔮$ ...
user avatar
1 vote
1 answer
441 views

How to create python virtualenv through userdata in an Amazon EC2 (Amazon Linux 2) instance?

How to create python virtual environment in ec2-instances? I am try to create virtual environment in ec2-instances while i am creating ec2-instances so need to imporve the code on user-data. User-data ...
user avatar
0 votes
0 answers
47 views

error msg when open linux terminal

I installed a virtualenv in the other day using pip and its not working properly, also when i start the terminal it opens whit that msg on the top > bash: /usr/bin/python: Arquivo ou diretório ...
user avatar
2 votes
2 answers
5k views

Permission Denied When Trying to Create Python3 Virtual Environment

Ubuntu 18.04 LTS I'm trying to allow users to create their own virutalenv for python3, however when trying to create said environment using a standard user account with this command:$ python3 -m venv ...
user avatar
  • 43
1 vote
0 answers
169 views

pytest WinError 123 on Windows 10 in conda virtual environment

My question is probably related to this SU question. But this question did not receive any answers, so I will describe the problem again: I open my Anaconda prompt, navigate to my project directory, ...
user avatar
  • 11
3 votes
1 answer
541 views

macOS Catalina (10.15) not using correct Python interpreter within virtual environment

Since updating to Catalina, after activating a virtual environment, it does not affect which python interpreter is called when using the python or python3 command. I confirmed that I am still using ...
user avatar
0 votes
1 answer
851 views

Properly installing and using Nuitka within Anaconda, " No module named 'nuitka.__main__' "

I'm trying to use Nuitka within the Anaconda Prompt. Nuitka has been installed through conda: conda install -c conda-forge nuitka See documentation here: https://nuitka.net/doc/user-manual.html#...
user avatar
-1 votes
2 answers
877 views

Setting virtualenv and running python code on boot

I'm trying to have some code executed on boot and haven't been able to get it to run as rc.local, cron, or a system service. So I'm sure I'm doing something wrong -- I just don't know what. These are ...
user avatar
  • 1
3 votes
1 answer
2k views

I started virtualenv on Mac OS, then unable to deactivate it completely

I started virtualenv on my Mac OS, using the commands python -m virtualenv envsp source env/bin/activate Then it was successfully activated. Then I entered exit, and I got a response which says ...
user avatar
0 votes
0 answers
2k views

virtualenv returns [Errno 13] Permission denied

I am trying to start a new virtual environment in my folder. I have Python3, Python2 and virtualenv installed, it doesn't seem to be a dependency problem. I do the command: sudo virtualenv -p ...
user avatar
  • 1
1 vote
1 answer
248 views

my virtual environment cannot be found

I'm on a PC windows 10 and always open git bash, then source activate my-env and open a jupyter notebook; somehow my-env broke and I get this error: "C:\bld\conda_1565126647711_h_env/etc/profile.d/...
user avatar
  • 23
2 votes
1 answer
2k views

Error "You must 'source' the script:" while trying to ativate python virtualenv on Windows10

python 3.7.1 Windows 10 Powershell Steps taken: create folder for envs change to folder pip install virtualenv virtualenv "abc" abc\Scripts\activate This throws the error stated in the title. I have ...
user avatar
  • 23
2 votes
0 answers
259 views

Error creating virtual environment and using pip

Everytime I try to use pip to do something pip install <package> I get an error OSError: [Errno 9] Bad file descriptor I tried installing and reinstalling anaconda. I'm currently trying ...
user avatar
0 votes
1 answer
95 views

virtualenv creates a thousand processes in cygwin

So i attempted to run a virtual environment, but the command, virtualenv venv Started about 1000 python processes and never completed. Is this normal or some bug? I am working in cygwin on windows ...
user avatar
1 vote
0 answers
216 views

Unable to set python3 as default on cloud9 using virtualenv

I'm using AWS cloud9 and am having trouble switching from python2 (which is default when you create an environment) to python3. My goal is to run a flask app and have it run in python3. I've tried ...
user avatar
0 votes
1 answer
403 views

Creating Python venv for running a dash application on PythonAnywhere

I am trying to create a Python venv to include packages like dash so I can deploy a dash application on PythonAnywhere. I was unable to follow the PythonAnywhere instructions for creating a virtual ...
user avatar
  • 1
0 votes
0 answers
47 views

Monitor does not come out of sleep at power-up until I press reset button

I have just upgraded from Ubuntu 18.1 to Ubuntu 19.04. My PC configuration is: Motherboard: Gigabyte EP43T-USB3 Processor: Intel® Core™2 Quad CPU Q8400 @ 2.66GHz Graphics: Nvidia GeForce GT 730/PCIe/...
user avatar
2 votes
2 answers
3k views

systemd service running from pipenv

I wanted to install ElastAlert, an alerting tool written in python2, inside of a pipenv in an attempt to keep applications and their requirements/ dependencies from stepping on one another while ...
user avatar
  • 21
0 votes
1 answer
803 views

Keeps getting &Python Path was unexpect at this time error in VS Code

This issue happening starting from today when I was doing some coding in Python in Visual Studio Code. I usually develop my program in a virtual environment, but today for some reason, when I tried to ...
user avatar
  • 101
1 vote
1 answer
2k views

Cannot create virtual environment in Pycharm 2019.1 with anaconda 3

How can I create a python virtual environment interpreter with Pycharm and Anaconda? The usual procedure doesn't work. With new Pycharm 2019.1 and Anaconda 3, I am unable to create a virtual ...
user avatar
0 votes
1 answer
2k views

pip install -r requirements.txt not installing everything

I recently installed Mojave and then I had to upgrade my VirtualBox & vagrant afterwards. I am currently having an issue installing the requirements.txt in my venv. Could not find a version that ...
user avatar
2 votes
0 answers
173 views

VSCode remote Python virtual environment

Here is how the thing doesn't work: The project source code is located on a remote machine. The Python virtual environment is installed in the project's root directory (using venv). I sshfs the ...
user avatar
0 votes
2 answers
6k views

virtualenv: can't find '__main__' module

$ virtualenv --system-site-packages -p python3 ~/PyVEnv Running virtualenv with interpreter /usr/bin/python3/usr/bin/python3: can't find '__main__' module in '/usr/local/lib/python2.7/dist-packages/...
user avatar
0 votes
1 answer
155 views

how to auto start supervisor installed in a virtual env on host startup/boot

I have an ubuntu server, and installed supervisor already in side my virtualenv, and it's working when I manually start it up. I also tried to put the init script under /etc/init.d/ folder, but cannot ...
user avatar
  • 1
0 votes
1 answer
3k views

python virtualenv ERROR: unknown command "config"

# virtualenv tmp/.venv New python executable in /root/tmp/.venv/bin/python Complete output from command /root/tmp/.venv/bin/python -m pip config list: ERROR: unknown command "config" -----------------...
user avatar
1 vote
1 answer
380 views

Installing the python packages in virtual enviroment with sudo

Actually I came across the problem while trying to install mySQL on a Django development virtual environment. pip install mysqlclient I tried running sudo pip install mysqlclient. It runs well, but ...
user avatar
22 votes
7 answers
81k views

`python3.7: bad interpreter: No such file or directory`

I installed Python, pip3, and virtualenv as in this guide for TensorFlow: brew install python pip3 install -U virtualenv Then I was able to create a virtual environment with: virtualenv --system-...
user avatar
  • 1,533
0 votes
1 answer
130 views

Is there a simple low-overhead way to install deb packages in a virtual environment?

When I'm working on some arbitrary project I usually need a couple of packages. For all the python packages I create a virtualenv so that once I'm done I can delete the whole thing, and it does not ...
user avatar
  • 535
7 votes
5 answers
49k views

What is the alternative for source command in cmd?

I want to run the Windows (Command Prompt) equivalent of source myvenv/bin/activate so as to activate and enter into my virtual environment.
user avatar
67 votes
6 answers
96k views

Can't install virtual interpreter in PyCharm in Linux

When I try to add virtualenv as an interpreter in PyCharm Community 2018.1.2 in Kubuntu 18.04 I get the following error: ModuleNotFoundError: No module named 'distutils.core' How can I solve this?
user avatar
  • 1,939
0 votes
0 answers
977 views

Remove Python alias to use virtualenv for Python

When I install virtualenv and activate it which python returns my /usr/bin/python. I read here it is because I have python alias in my bash startup scipt and virtualenv doesn't work with it. However, ...
user avatar
  • 1,939
4 votes
2 answers
8k views

Activate virtualenv using alias

I can activate my python virtual environment from it's folder by entering . bin/activate. I'd like to instead type a single word alias, such as shazam, from the home folder (or anywhere else) that ...
user avatar
0 votes
1 answer
760 views

Unable to set up virtualenv on CentOS for python3

I am using a server that runs CentOS. The default version of python there is 2.7. It also has python3.4 installed. The package I need to work with requires python3.5. I installed python3.5 but it was ...
user avatar
0 votes
1 answer
296 views

I have lost the venv part of my agnoster prompt on Apple Mac

macOS 10.12.6 Sierra Hello, I have just installed Zsh and Oh-my-zsh. I then selected the Agnoster theme and was very happy with it. Now, after some tweaking I seem to have lost the venv part of my ...
user avatar
0 votes
1 answer
1k views

How to install numpy on Python 2.7 in virtualenv?

I'm trying to install numpy on Python 2.7 in virtualenv (on Cygwin). However, when I try to import numpy, I get an ImportError: Administrator@Ron ~/python/virtualenv $ virtualenv -p /usr/bin/python2....
user avatar
6 votes
2 answers
2k views

What do double curly braces mean in systemd scripts?

A stackoverflow answer about running python scripts upon system startup uses {{ and }} in its syntax. What do they mean? ExecStart={{ venv_home }}/bin/fooservice --serve-in-foreground I am also not ...
user avatar
1 vote
0 answers
201 views

How can I troubleshoot VENVs `--system-site-packages` not mirroring my system?

I'm running Arch Linux and want to use virtual environments to install only those few PIP packages I use for specific projects while continuing to use the Arch packages for Python. However, when I ...
user avatar
  • 915
0 votes
3 answers
11k views

Windows CMD cannot use Python Virtualenv or Django commands

I'm trying to use python Virtualenv and Django. I have successfully installed both using Pip. On every tutorial I've found, it tells me to open CMD and type in a command. For example: C:\Users\USER\...
user avatar
-1 votes
2 answers
5k views

Find the explicit path of %USERPROFILE% in windows 7

I am trying to find the current %USERPROFILE% path on windows 7. What is the simplest way to do this? I've tried hunting around with regedit N.b. I'm doing this as part of setting up a python ...
user avatar
  • 809
3 votes
1 answer
4k views

Python virtualenv not activating in Windows 10 Cmder

I use Cmder on windows 10 with Python 3.5 and virtualenv on my laptop and work computer just fine. Now I have a new computer running Windows 10, Python 3.5, virtualenv 15.0 and I am able to ...
user avatar
  • 133
1 vote
1 answer
342 views

lost virtualenv display to the left of bash prompt

I added thy Holy prompt to display my current branch so I never push to master. We all use it and it works, but I am no-longer seeing what virtualenv I'm using at the moment, which is a hassle. Based ...
user avatar
  • 370
2 votes
1 answer
4k views

bash -c "workon" return: "command not found"

Using "workon" in bash result in list on envs. bash> workon project_1 When trying via bash -c, error is returned. bash> bash -c "workon" bash: workon: command not found Edit 1: More ...
user avatar
  • 182
0 votes
1 answer
2k views

How to run script in same session without exec?

I have below script to set me in my project:- #! /bin/zsh source ~/.zshrc crld #alias for Project base cd Kenneth_Love/survivalguide workon kenneth_tutorial This script works but doesn't drop me in ...
user avatar
14 votes
1 answer
20k views

Create a Python 3 virtual environment

I installed python3-virtualenv on Lubuntu 15.1 using the official Ubuntu package apt-get install python3-virtualenv. The official documentation indicates that a simple virtualenv . in my project ...
user avatar
  • 329
1 vote
1 answer
1k views

pip install virtualenv taking forever on Windows 7

I'm trying to setup everything in order to start developing with python and Django on a Windows 7 laptop. I already installed python 2.7.11 from here and installed pip using the get-pip.py script and ...
user avatar