Questions tagged [virtualenv]

1

votes
1

answer
1.3k

Views

Installed BeautifulSoup but still get no module named bs4

I'm using a Jupyter notebook, Python 3.5, and a virtual environment. Within my virtual env I did: (venv) > pip install BeautifulSoup4 Which seemed to run fine b/c the terminal output was: Downloading beautifulsoup4-4.6.0-py2-none-any.whl (86kB) 100% |████████████████...
14wml
1

votes
1

answer
130

Views

Specifying a url to a .whl file in a conda env .yml file

I want a specific older version of a package (h2o) to be installed when I load a conda env .yml file. However, the older versions for this package only seem to work if I install them using pip directly from a the url hosting the .whl file. For example if I want to install version 3.18.0.8 I need to...
Dan
1

votes
2

answer
54

Views

Where should source code be saved when working with virtualenv?

Should I create a directory in my virtualenv and save the source code for that specific project there? Thanks in advance
AnriSonohara
1

votes
4

answer
116

Views

Use python2.7 in venv where python3 is default python

I have python2.7, python3.7, python3.6 on my machine. I am still not sure how manage and see location of all three python version. Currently I just type python with version name to open that terminal or run script. I did python3.6 default by aliasing in ~/.bashrc. I have installed virtualenv using...
Jhon Patric
1

votes
2

answer
54

Views

Python and virtualenv - why is the python version used to name subdirectories? [closed]

Why does the virtualenv creation mechanism insist on naming subdirectories with the version of Python used? I am referring to something like test_venv/venv3/lib/>>>python3.6 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings ├── lib-dynload -> /opt/local/Libra...
JL Peyret
1

votes
1

answer
14

Views

How do I constrain my Python history to a virtual env?

Python 3 appears (at least by default) to keep the history of interactive commands in a global location, ~/.python_history. As a result, commands issued in different virtual envs are merged. Is there a way to segregate my Python history so that each virtual env has (and access) its own?
orome
1

votes
1

answer
193

Views

Lemur + PostgreSQL - can't render element of type

I'm trying to locally deploy a Netflix open project locally using the following documentation https://media.readthedocs.org/pdf/lemur/latest/lemur.pdf (page 46) and following these steps: git clone git://github.com/netflix/lemur.git # Create a python virtualenv mkvirtualenv lemur # Make the magic h...
David Faiz
1

votes
1

answer
42

Views

PIP is linked only to system environment

I'm using pyenv-virtualenv on Ubuntu 16.04 LTS. While I was installing imblearn package for my virtualenv using Python 3.5, I realized it was being installed on system environment which uses Python 2.7. I checked with pyenv version but it clearly returned that I was on my virtualenv. I opened a Pyth...
user8397275
1

votes
1

answer
277

Views

Cannot create Virtualenv in Python

I'm struggling with virtualenv in Python. After virtualenv _env I get: Running virtualenv with interpreter /usr/bin/python2 New python executable in /home/marcin/Documents/Projects/django_tutorial/_env/bin/python2 Also creating executable in /home/marcin/Documents/Projects/django_tutorial/_env/bin/p...
bigmeister
1

votes
0

answer
199

Views

I cannot install kivy for python 3.6 on os x in a Virtualenv

When I try to install (using homebrew) kivy for python 3.6 in a virtualenv: (vs36) MacBook-Pro-de-Juan:Environments juancarlos1$ python Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type 'help', 'copyright', 'credits' or 'license' for...
JCAguilar
1

votes
2

answer
522

Views

Unable to use toco (the compiler to optimize tf models) due to permission denied error

I am following this tutorial: https://codelabs.developers.google.com/codelabs/tensorflow-for-poets-2-tflite/index.html?index=..%2F..%2Findex#3 I have completed the first 3 steps, but now when I try to use toco I get this permission denied error even though I am the admin. Using sudo has not helped....
D_M
1

votes
1

answer
105

Views

Unable to run BeautifulSoup in Python Virtual Environment

I've installed BeatifulSoup4 in my virtual environment as shown below. I'm able to import and use it normally inside my virtual environment interpreter; however, the interpreter couldn't find BeatifulSoup when I run the script directly. I haven't installed BeatifulSoup in my native environment. H...
dreamzboy
1

votes
1

answer
227

Views

Problems of VirtualEnv and pip3

I used VirtualEnv to create a python2 environment without system site packages like this: virtualenv -p /usr/bin/python2.7 --no-site-packages ENV2.7 And I want to install packages in this environment. However, I found that my python code is still trying to look for packages out of this environment...
Bo Han
1

votes
0

answer
83

Views

Virtualenv creation on Ubuntu does not work and takes forever

I'm unable to create a virtualenv on Ubuntu. It takes forever and does not succeed eventually. Using base prefix '/home/corleone/miniconda3' New python executable in ../bin/python Installing setuptools, pip, wheel... It gets stuck at this and never proceeds. This is how I'm creating the virtualenv:...
waqasgard
1

votes
0

answer
163

Views

How to start notebook from a virtualenv

I've installed Python 3.6 in my machine and created a virtual environment where i've installed some libraries I wanted. I've also installed jupyter notebook via anaconda site. Now, when I open Jupyter notebook from the virtual env I created in step 1, for some reason it looks like it is not really u...
Ravi
1

votes
2

answer
69

Views

Record python version to rebuild virtualenv

The convention to record package requirements for future installation in a python virtual environment is to use pip freeze > requirements.txt and then install using pip install -r requirements.txt The python interpreter version, however, is not recorded in the requirements.txt file. Is there a simi...
Kevin L.
1

votes
0

answer
251

Views

virtualenv issues on Ubuntu 16.04 with Python3

I'm trying to setup a virtualenv with virtualenvwrapper on my Ubuntu 16.04 development machine for python3.5.x. I installed them with the following: sudo -H python3 get-pip.py sudo -H pip install virtualenv virtualenvwrapper Here's the state of things: $ which python /usr/bin/python $ which python3...
lollercoaster
1

votes
0

answer
46

Views

Python file does not recognise library installed in virtual environment

Explanation I had a previous post but I deleted it due to it being meandering and coming to the wrong conclusions. The command I'm running below doesn't make sense on its own, but it's the file that is ultimately causing problems when other scripts I have run this file down the code path. I have Pyt...
Geesh_SO
1

votes
0

answer
215

Views

ImportError: cannot import name pywrap_dlopen_global_flags

I get the following error when trying to use tensorflow (version - newest as of date of posting) on Hardware - MacBookPro CPU with OS - Dual Boot Ubuntu 16.04 LTS in a virtualenv —no-site-packages with Keras and keras-rl and python 2.7. ... Using TensorFlow backend. 2018-02-15 18:55:01,909 [Threa...
zustandfänger
1

votes
1

answer
135

Views

Scrapy install in virtualenv - cant resolve issue. looks related to lxml?

Good day! I'm pretty new to python/scrapy as in never tried it. I've been able to work through a lot of the issues I've come across but I'm stuck trying to resolve 'Running setup.py bdist_wheel for lxml ... error' I can't seem to get past it. I've tried to 'pip3 install lxml' but that fails. I could...
user3408397
1

votes
0

answer
307

Views

virtualenv pip install scrapy not working as non root user but working as root

I am having trouble installing lxml and scrapy in my virtualenv while logged in as non root user. The installation works fine for the same environment when logged in as a root user. The steps that I followed are as follows : Logged in as non root user virtualenv -p python3 test cd test source bin/ac...
coderkane
1

votes
0

answer
261

Views

virtual environment not importing packages from virtual environment site-packages in Python 3.6.4

I created a virtual environment (venv64) for python 3.6.4. and installed ujson. It is installed in virtual environment site-packages. But, when I am trying to import ujson in virtual env. It gives me an error: ModuleNotFoundError: No module named 'ujson' When I checked sys.path I got: ['', 'C:\\Pyt...
Khushal Adlakha
1

votes
0

answer
21

Views

pip list -o with target library without virtualenv

Is there any existing functionality to show outdated packages that are contained within a target lib directory installed with the equivalent of pip install -r requirements.txt -t lib without the use of a virtualenv? Maybe some working form of pip list -o -t lib If no functionality or simple workarou...
yoonjesung
1

votes
0

answer
173

Views

Virtualenv not isolated

I am using pyenv and pyenv-virtualenv. I create a brand new environment: » type python python is ~/.pyenv/shims/python » python --version Python 2.7.12 » pyenv --version pyenv 1.2.1-19-g445d59a » pyenv virtualenv --version pyenv-virtualenv 1.0.0 (virtualenv 15.1.0) » pyenv virtualenv 2.7.14 mye...
dangonfast
1

votes
0

answer
235

Views

Pycharm doesn't activate virtualenv in terminal after conda

I'm working in a scrapy project with pycharm on Windows. It always opened terminal in correct virtualenv without problems. But since I've executed a conda installation of a particular package, the venv doesn't load anymore on terminal by default, though is setted in project. How can I solve this? Fr...
Lore
1

votes
0

answer
44

Views

attribute error when creating virtualenv

I'm trying to create a virtualenv with the python3.6 interpreter. Just running virtualenv works fine, but creates an env with the 2.7 interpreter. When I try again with the command virtualenv -p I get the error Attribute error: module enum has not attribute Intflag. I'm not sure how to interpret...
asheets
1

votes
0

answer
60

Views

Setting config for completion and history in a virtualenv

I am still learning Python and nowadays I discover the use of virtualenv. I run LMDE2 (based on Debian 8) which provide Python 2.7 (OS default) & Python 3.4. I manually installed Python 3.6. In a virtualenv with python3.6 (chosen with -p option) the console as no history or command completion… and...
freezed
1

votes
0

answer
352

Views

Making Python IDLE use virtualenv by default

I installed Python 3.6 on my windows in the standard manner (IDLE being located at ..Python36-32\Lib) What I want is for IDLE to default to my virtualenv. Is there a way I can do it? I searched and found this post but the last reply in the post makes me believe that most of the answers there are fo...
Stan
1

votes
1

answer
138

Views

Django deploy to Production in Ubuntu 16.04

I'm fairly new to django , i have to deploy the project to production mode in ubuntu 16.04. I have installed wsgi with apache2 and included the system path to the django project and python site-packages. My sites-enabled/000-default.config is ServerAdmin [email protected] ServerName myproject.com...
Sangeetha Krish
1

votes
0

answer
131

Views

PYTHONPATH value in virtualenv

I have issue with PYTHONPATH while using virtualenv. I have set my PYTHONPATH as below which has python dist-packages are above package of PYTHONPATH value export PYTHONPATH=/opt/tangoworkspace/CentralNode/Alarm/Panic_Alarm_Suite:/opt/tangoworkspace/CentralNode/Alarm/Panic_Alarm_Suite/PANIC-master:...
Hitesh Patel
1

votes
0

answer
403

Views

Creating Python 2.7 virtualenv gets stuck on Installing setuptools, pip, wheel

I am setting up a new project folder in PyCharm that requires Python 2.7. When I try to create the virtualenv the install gets stuck on 'Intalling setuptools, pip, wheel'. I tried creating this venv in PyCharms interface and when that did not work I also tried doing this in the terminal as well. Bo...
user3088202
1

votes
0

answer
391

Views

Missing pkg_resources.py31compat

I tried to set up a virtualenv and I have setuptools (39.0.1). And I got In [1]: import pkg_resources.py31compat --------------------------------------------------------------------------- ImportError Traceback (most recent call last) in () ----> 1 import pkg_resources....
kawingkelvin
1

votes
1

answer
291

Views

How to Install requests[security] in virtualenv in IntelliJ

I'm using python 2.7.10 virtualenv when running python codes in IntelliJ. I need to install requests[security] package. However I'm not sure how to add that [security] option/config when installing requests package using the Package installer in File > Project Structure settings window.
alegria
1

votes
1

answer
28

Views

downloading tensor flow on mac v10.13.4 with Virtualenv [duplicate]

This question already has an answer here: pip install -r: OSError: [Errno 13] Permission denied 7 answers from the site tensorflow provides 'Installing TensorFlow on macOS' but after running the following command: $ pip install --upgrade virtualenv I get the following message: Collecting virtualenv...
Noahwar97
1

votes
0

answer
219

Views

Unable to install twisted inside virtualenv on ubuntu 12.04

I am trying to install twisted inside virtualenv, everything seems to go fine but at the end this error is displayed. Command 'python setup.py egg_info' failed with error code 1 in /tmp/pip-build-14YOyA/twisted/ The OS is ubuntu 12.04, does someone have any idea ? here is the displayed text: (solidw...
z.rico
1

votes
0

answer
53

Views

Setting an environment in subprocess to execute a batch file

I tried to set an environment with a *.sh file in a bash shell and then to execute a batch file with python subprocess. Here is my code: import subprocess p = subprocess.Popen('. ./bin/testenv.sh', ['start', '-b', 'cm.bat'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, exec...
mscm
1

votes
1

answer
96

Views

How to run python script with python from virtual environment without cmd

Does anyone know how to run python script with python from virtual environment without cmd. In Linux it is easy with shebang. Problem is that I have installed Python2 and on MyProject I have created virtual environment in Python3. Now when I click on main.py in MyProject I get syntax error and that...
PythonMan
1

votes
0

answer
132

Views

sqlite3 Module not found error and Command “python setup.py egg_info” failed with error code 1

Have been trying to run my python program on my hosted server. I tried doing it with an virtualenv mentioned over here https://www.godaddy.com/garage/how-to-install-and-configure-python-on-a-hosted-server/ I am using PUTTY to run the program but its showing this error ModuleNotFoundError: No module...
Akhil Karkera
1

votes
0

answer
44

Views

bypass pkg_resources.DistributionNotFound

I have a python application that requires a package that uses newrelic. I want to test my application with a newer version of newrelic, but the package has a max version on newrelic which is lower then the one I want to test out. So before I update the package to use the newer version of newrelic I...
Anders Theet
1

votes
0

answer
978

Views

Using conda installed in Virtualenv

I want to use conda install command in Virtualenv but do not know how to do that. I did following things: First I created a Virtualenv called tensorflow2 module load python/3.5 virtualenv tensorflow2 source tensorflow2/bin/activate I checked wich conda I am using: (tensorflow2) [[email protected] ~]$...
Kunyu Shi

View additional questions