Questions tagged [virtual-environment]

544 questions
3
votes
0 answers

virtualenvwrapper on Mac (using terminal) : Error while finding module specification for 'virtualenvwrapper.hook_loader'

Trying to finish installing virtualenvwrapper. I have already installed Python 3.8.3 and virtualenv/virtualenvwrapper but when I am exporting to setup a virtual environment location using: export WORKON_HOME=$HOME/.virtualenvs export…
3
votes
4 answers

How do I fix this error "DistributionNotFound: The 'zipp>=0.5' distribution was not found and is required by importlib-metadata"?

I'm tying to create a virtual environment in my mac terminal and I get the following error. Could you please help me how I can fix this? hangsunkim@Hangs-MacBook-Pro ~ % virtualenv --system-site-packages -p python3 ./venv Traceback (most recent call…
3
votes
1 answer

how to create conda environment from within Miniconda

I have Anaconda3 (Python 3.7) install on my MacOS. For specific project, I installed Miniconda3 (Python 3.6). I would like to install packages with Miniconda but whenever I create new conda environment, it installs it within the Anaconda3 and uses…
A.E
  • 997
  • 1
  • 16
  • 33
3
votes
2 answers

Search anaconda environments for envs where a certain package has been installed

I submitted an issue on an open source python library and received feedback that the devs couldn't reproduce the error. I had installed the package into a conda environment, and I want to figure out what environment(s) I installed the package into…
David Marx
  • 8,172
  • 3
  • 45
  • 66
3
votes
1 answer

Error running Pyomo in a virtual environment

I want to solve an optimization problem with pyomo in a virtual conda-environment. I installed pyomo and the glpk-Solver with "conda install-n envname packagename". When I test the solver I get the following error: (venvconda)…
ni33na
  • 31
  • 2
3
votes
0 answers

EOFError: Compressed file ended before the end-of-stream marker was reached when importing a .tar.gz file

I am actually able to get this code to work perfectly without error through one environment that I am working through. However, when I write the code (see below) in another environment I get an error: import tarfile import numpy as np texting =…
3
votes
0 answers

What makes in Python a virtual environment a virtual environment?

I want to find the Python virtual environments ("venvs" for short) in my file system, and for this I need to know what set of files constitutes a venv. Some tools - when they want to make sure a directory is a venv - check for the pyvenv.cfg file,…
halloleo
  • 9,216
  • 13
  • 64
  • 122
3
votes
2 answers

AWS Deep Learning AMI Virtual Environment Activation

I'm trying to set up a Jupyter Server using AWS EC2 starting with a Deep Learning AMI (Ubuntu) Version 7.0 AMI. It says that it comes with separate virtual environments: Comes with latest binaries of deep learning frameworks pre-installed in…
3
votes
3 answers

Run DJango server from outside of virtual environment by using script

I have created DJango Project inside virtual environment. Let's say virtual environment DJangoProject project name is Mysite I am tired of running ./manage.py runserver everytime so that I wanted to automate running server when I was logged into…
Ramsk
  • 171
  • 2
  • 11
2
votes
1 answer

How to download spaCy models in a Poetry managed environment

I am writing a Python Jupyter notebook that does some NLP processing on Italian texts. I have installed spaCy 3.5.3 via Poetry and then attempt to run the following code: import spacy load_model = spacy.load('it_core_news_sm') The import line works…
2
votes
1 answer

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 comparison, I wrote 'import ' in code, then it…
2
votes
2 answers

How to use .env files and environment variables with Python and macOS

So I am connecting to an RPC cloud-node and trying to get the latest block from the Ethereum blockchain, along with all the block details and have written some code in python using web3.py. I have the code ready and according to the official doc…
2
votes
1 answer

pyhton vscode venv ModuleNotFoundError: No module named 'bs4'?

I'm in my virtual environment in vscode, installed beautifulsoup, and I can see the latest version file in the virtual environment files, and I'm running the notebook yet it gives the error of ModuleNotFoundError: No module named 'bs4', any help…
2
votes
2 answers

Conda doesn't see a module in the same directory

When I try to run a script in conda environment it gives me a ModuleNotFound error (ldm) C:\Users\Иван\Documents\git\stable-diffusion>python scripts/txt2img.py --prompt "a photograph of an astronaut in space" --plms Traceback (most recent call…
2
votes
2 answers

unable to activate the mounted conda environment

I mount the conda environment in the linux. Then I activate the environment in the linux. export PATH=$PATH:/opt/miniconda/bin source activate /anaconda_env/personal/env1 Then I got this error: /anaconda_env/miniconda/bin/conda: line 3: import:…
Susan
  • 431
  • 1
  • 4
  • 16