Questions tagged [virtualenv]
virtualenv is a tool that creates sandboxed Python environments.
7,352
questions
0
votes
1
answer
23
views
Create virtualenv for python 2.7 with python 3.10 [duplicate]
I am trying to create a virtual environment for python 2.7 on Ubuntu 22.04. I always receive an error as follows:
RuntimeError: failed to query /usr/bin/python2.7 with code 1 err: ' File "/usr/...
1
vote
1
answer
25
views
Can't make virtual environment using virtualenv with python 2.7 on Windows 10
I need a python 2.7 install for some niche lib that runs into errors on 3.8.
So I tried to make a virtual environment using virtualenv using the following command:
virtualenv -p C:\Python27\python.exe ...
0
votes
1
answer
35
views
What's wrong with installing scipy via pip, py39 under FreeBSD 13.1?
I'm triyng to install scipy via pip in an virtual environment but it ends with an error.
$ uname -a FreeBSD BSD-13 13.1-RELEASE-p3 FreeBSD 13.1-RELEASE-p3 GENERIC amd64
Venv is with python 3.9
What I ...
0
votes
0
answers
9
views
Update submodule in virtual environment with poetry
How can I properly update the git submodule within poetry's virtual environment?
This is the project's folder structure:
main-project-repo/
├── .venv
│ ├── lib
│ │ ├── submodule-package
│ │ │...
2
votes
1
answer
35
views
No module named 'flask' in virtualenv
I was running pgAdmin4 in Centos 8 with no problems. I upgraded to pgAdmin4 7.11 and now it no longer works. This is the error:
ModuleNotFoundError: No module named 'flask'
Flask is installed in the ...
0
votes
1
answer
26
views
ModuleNotFoundError: No module named 'flask_googlemaps'
I am building my first ever Flask app and I created a virtual environment and ran pip install flask_googlemaps as per the instructions for flask-googlemaps, however I keep returning the ...
0
votes
1
answer
16
views
Failed to create virtual environment in PyCharm (Python 3.4 )
I'm working on a project which requires Python 3.4 due to needing old modules which have not been maintained in ten years. For this I'm trying to create a virtual environment in Pycharm, but it's not ...
0
votes
1
answer
69
views
How to create diff environments for different Python packages in production
I am new to Python as well as Azure, so I might be missing some crucial information with my design.
We have couple of libraries which are created to be used by user while working on their Azure ML ...
1
vote
1
answer
38
views
Pycharm venv from different python versions
I am using Pycharm on Windows 10. I have an old Python installed using Anaconda (3.8) and a newer version of Python that I installed thanks to the official installer (3.11).
The issue is that I have ...
-1
votes
0
answers
28
views
Installing matplotlib error in a virtual environment
I get the following error, and it does not make sense to me since I have python 3.6.9
(aienv) raebel@jetson:~/first$ python -m pip install matplotlib
Collecting matplotlib
Using cached matplotlib-3....
0
votes
0
answers
10
views
How can I install a private Python package on JupyterHub running on a single EC2 instance with multiple users?
I'm trying to create a development environment for a team of data analysts.
The setup should be JupyterHub running on a single EC2 instance with multiple users who have access to a private Python ...
0
votes
1
answer
18
views
Avoid changing powershell script directory when running python virtualenv
for the powershell script below
function jl1 {
cd C:\Users\MyUser
Envs\huggingface\Scripts\activate
cd "D:\Working"
jupyter lab
}
Set-Alias jl jl1
I always run jl on ...
0
votes
1
answer
33
views
How to install wheel while using a python virtual environment?
I followed instructions to install a wheel while my virtualenv was active. When I went to use it I found it wasn't available but when I deactivated the venv it was, so it appears that although the ...
0
votes
0
answers
26
views
venv is a package and cannot be directly executed
I receive the following error when creating a virtualenv and am unsure how to overcome it. My OS is Oracle Linux Server 7.9.
No module named venv__main__; 'venv' is a package and cannot be directly ...
0
votes
1
answer
38
views
Having trouble opening a virtual environment in python3.9
I have installed python3.9 through apt in my Ubuntu 18.04.6 LTS. Then I was trying to create a new virtual environment that runs on 3.9. This is the process I did:
$ python3.9 -m venv /home/user1/py3....
-2
votes
0
answers
43
views
Why do I get a 'ModuleNotFoundError' for 'torch' even though I installed it in my pip3 environment?
I get "ModuleNotFoundError: No module named 'torch'" even though I installed it on my pip3 env, and I can see it in the "pip3 freeze" command
pip3 freeze & error
0
votes
0
answers
38
views
Poetry using wrong Python version and wrong virtual environment
I am on Windows. I have made a virtual environment with Python 3.9.0 called venv in my current directory. I have activated it. If I run python --version I get 3.9.0:
This is not the system python, I ...
0
votes
0
answers
20
views
How to install kernel for jupyter notebook in virtual environment located in D drive?
I want to install kernel for jupyter notebook in virtual environment instead of local C drive so that I can download modules and packages in my virtual environment and use them from the virtual ...
0
votes
0
answers
28
views
Can't install package in Python virtual environment
I am getting error whenever try to install a Python package using pip in virtual environment using "(openvino_env) C:\Users\HP>pip3 install openvino-dev".
Get the error " Microsoft ...
0
votes
0
answers
35
views
zsh: killed python3.7 -m virtualenv ven error
Downloaded Python 3.7 and installed it on mac. Whenever trying to create virtualenv:
Command on mac terminal: python3.7 -m virtualenv venv
Getting the following error:
zsh: killed python3.7 -m ...
0
votes
2
answers
52
views
Why am I getting "_pickle.PicklingError: Can't pickle" error while using the PythonVirtualenvOperator in airflow in GCP?
I'm trying to use the PythonVirtualenvOperator from airflow to create an virtual environment for a specific task to run.
I'm just replicating the example given in the airflow documentation first,
My ...
-1
votes
0
answers
30
views
Safest way to create and distribute GUI
Might be a newbie question but I haven't really come across a clear cut answer for this yet. I am working on creating a GUI which will take in somewhat sensitive information in excel format which I ...
1
vote
3
answers
106
views
How to build a self-contained Python venv?
Is that possible to build a self-contained Python virtual environment? By self-contained, I mean that all needed files to execute the program are there, including Python.
I'm using Poetry to manage ...
0
votes
0
answers
15
views
PermissionError when creating mkvirtualenv for cuckoo
I am trying to setup Venv for cuckoo sandbox but when I run this command
$ mkvirtualenv -p python2.7 cuckoo-test
i get that error
PS: I am using Ubuntu 18.04.4enter image description here
i tried to ...
0
votes
0
answers
55
views
Python Nuitka Executable Doesn't Run Without virtualenv
The problem: My nuitka executable needs a venv folder, and it needs it to be in the place it was when I compiled the executable.
The steps I took:
In the folder where my project is I have an active ...
2
votes
1
answer
91
views
Creating python virtualenv is failing
Creating python3.10 virtualenv is failing
$python -v -m virtualenv --python /usr/bin/python3.10 py310
# /home/test/.local/lib/python3.7/site-packages/virtualenv/activation/python/__pycache__/...
0
votes
0
answers
46
views
pip install with target directory but skip already installed system packages
The pip install --target lets you install Python packages into a specific directory which can then be added to the PYTHONPATH (basically creating something similar to a virtualenv but without the ...
-1
votes
1
answer
46
views
Django-admin created an empty folder
I created a virtual environment than I installed Django successfully but when i try to create a project with django-admin startproject <project_name> Django create an empty folder?
I tried the ...
0
votes
0
answers
43
views
lxml in virtual environment
These seems like a common issue but I cannot find a solution (looks like others have the issue on Windows so they build from a binary file).
Anyway, I want to add "python-docx" to my virtual ...
0
votes
0
answers
40
views
How to clear pipenv's cache
I am trying to run a simple pipenv install command on a project which returns an error with the numpy library. I already ran the pipenv --clear command, but when I run:
pipenv install --skip-lock --...
2
votes
1
answer
77
views
How to run Gunicorn inside virtualenv?
Background
I'm currently configuring a Nginx + Gunicorn + Django + virtualenv setup. I have a prod_settings which will be used for production, and set DJANGO_SETTINGS_MODULE env variables to it by ...
-1
votes
0
answers
68
views
RuntimeError: no .dist-info
C:\Users\Teh Yan Yang>mkvirtualenv test
RuntimeError: failed to build image pip because:
Traceback (most recent call last):
File "C:\Program Files\Python311\Lib\site-packages\virtualenv\seed\...
0
votes
0
answers
48
views
Error in installing neuralcoref from github
I am getting this error even after trying to install neuralcoref from github. I have installed Microsoft visual C++ distributer (version 14.34), Windows SDK add on(10.1), windows software development ...
0
votes
0
answers
29
views
different output running py on terminal and on vscode
import os
import spacy
import matplotlib.pyplot as plt
from wordcloud import WordCloud
print('ok')
Running “Python main.py” on iterm terminal
ok
Running “Python main.py” on vscode terminal
(base) ...
0
votes
0
answers
23
views
How do I create a Conda env in one Docker image, then use that env in another Docker image?
I have one Dockerfile that looks like this:
FROM python:3.10.9
COPY ./env.yml .
RUN apt-get update && \
apt-get install -y wget bzip2 && \
wget -q https://repo.anaconda.com/...
-1
votes
0
answers
73
views
Python virtual environment in VSCode giving me issues
Traceback (most recent call last):
File "ArtificialNN/environment/lib/python3.9/site-packages/numpy/core/__init__.py", line 23, in <module>
from . import multiarray
File "...
0
votes
1
answer
110
views
Upgrade python version in virtualenviornment in visual studio code
I have a combination of this two questions on stackoverflow:
How do I update a Python virtual environment with `venv` (in Python 3.3+) to use a newer version of Python?
python3 : The term 'python3&...
0
votes
0
answers
25
views
Flask and Virtual Environment setup
I am trying to learn flask and python and can't get virtual environment setup.
This is what I did so far
Create a folder , randomly named it myflask
Inside the folder I started command prompt and ...
0
votes
1
answer
31
views
ModuleNotFoundError: no module named "python_file" in Gunicorn using Flask
I'm codding a webserver to be hosted in an aws ec2 instance with Ubuntu, later I will link it to the frontend for POST and GET requisitions. I did the same steps as shown in Deploying a Simple Python ...
2
votes
1
answer
44
views
why pyinstaller available in virtual environment even I did not install it
I created a python virtual environment by virtualenv and activate it, then I found I can use pyinstaller in this vir-env, but I had not "pip install pyinstaller" in it, why? And as ...
1
vote
2
answers
44
views
There are several packages installed in my virtual environment but pip list doesn't show anything
I've created a new Django project since almost 1 month ago. I have several packages installed. As I'm using virtual environment I can find all these packages in this directory F:\newEnironment\Lib\...
0
votes
0
answers
40
views
ModuleNotFoundError on installed package in virtual environment
I created a virtual environment in python for my flask project and installed the spotipy package using pip. Under Lib/site-packages I can see the spotipy module. When I try to reinstall the package ...
0
votes
1
answer
43
views
ModuleNotFoundError when running Jupyternotebook in Virtual Environment
I have created a virtual environment using Anaconda and installed all the packages I need based on a requirements text file. Followed by installing the ipykernel. This is the code I've used.
conda ...
0
votes
0
answers
157
views
subprocess-exited-with-error when installing Python libraries in venv
I'm having trouble installing Python dependencies in a virtual environment. I am on a Windows 11 laptop and have multiple version of Python installed (3.10 & 3.11). I am using git bash from a VS ...
0
votes
1
answer
34
views
When launching a Python script using shell_exec, the script doesn't work
I have written a Python script that removes the background of an image using the rembg library and then composes the image using PIL.
For this project, a virtualenv was created and rembg was installed ...
1
vote
1
answer
63
views
Can I communicate between two python environments? Call functions from one environment to the next?
I have a Python app that requires a list of packages with specific versions. The app is incompatible with later versions of packages like numpy, scipy etc or will require significant engineering in ...
0
votes
1
answer
42
views
How do I create a specific version of Django Project in Pycharm( virtual environment)
such as My Python is 3.6.8,I want to create Django 1.11.8 project In virtual environment?How should I do? Used virtualenv
1、I create Django Project Under virtual environment in Pycharm,the Django ...
3
votes
1
answer
52
views
Should I install airflow inside a Docker or inside a virtual enviromment?
I'm a linux user for more than 10 year and have been learning to use airflow from some tutorials.
But I have made such a big mess on my OS, to the point I could not even stop airflow from startup on ...
0
votes
1
answer
23
views
Where does virtualenvwrapper's activate script live on Ubuntu?
I installed python2 and virtualenvwrapper on my ubuntu machine in order to run a very old set of scripts I've saved for an obscure task.
I run the following:
sudo apt-get install python2
cd ~/path/to/...
0
votes
1
answer
80
views
virtualenv Error: FileNotFoundError, No such File /home/user/.local/share/virtualenvs/project-xxxxxxxx/bin/python
What could cause this issue, are you familiar with this error message?
I googled and the only similar issues are years old and apparently fixed.
pipenv --python 3
Creating a virtualenv for this ...