virtualenv

pytest module not found

谁都会走 提交于 2021-01-29 18:00:28
问题 I'm having trouble running pytest on my package. I have the following structure... tree -f . ├── [ 0 Jan 4 22:04] ./__init__.py ├── [ 34K Jan 12 11:37] ./LICENSE ├── [1.4K Jan 6 07:43] ./README.md ├── [1.1K Jan 12 11:42] ./setup.cfg ├── [ 79 Jan 6 08:22] ./setup.py ├── [4.0K Jan 12 11:49] ./tcx2gpx │ ├── [ 701 Jan 6 23:13] ./tcx2gpx/__init__.py │ ├── [4.0K Jan 12 12:13] ./tcx2gpx/__pycache__ │ │ ├── [ 683 Jan 12 12:13] ./tcx2gpx/__pycache__/__init__.cpython-36.pyc │ │ └── [3.0K Jan 6 21:00] .

How to fix “IOError: [Errno 2] No such file or directory” when making Virtual Environments

倾然丶 夕夏残阳落幕 提交于 2021-01-29 15:21:59
问题 Whenever I try to use the 'virtualenv VirtualEnvironmentName' command or the 'virtualenv -p python3.8 VirtualEnvironmentName' command it says "IOError: [Errno 2] No such file or directory." I just want to make Virtual Environments, but I always get that error saying "No such file or directory." Thanks in advance. 回答1: To create a virtual environment, you must specify a path. Then you can activate the python environment by running the following command: your_working_directory\\Scripts\

How do I activate my virtual environment in Windows?

帅比萌擦擦* 提交于 2021-01-29 10:50:48
问题 I'm using VSC and trying to activate my virtual environment through its terminal. I've navigated to the project folder in terminal and ran: virtualenv ll_env which seems to successfully create the virtual environment. Now I tried to run ll_env/bin/activate and ll_env\Scripts\activate.bat to activate it but doesn't seem to do anything. Supposedly when I have activated it I'm supposed to see (ll_env)learning_log in terminal. Please help. I've attached a screenshot as well. 回答1: Use the

Atom shows ModuleNotFoundError when running python script

那年仲夏 提交于 2021-01-29 09:28:49
问题 I'm running Mac OS X (10.14.4) and I'm attempting to follow YouTube tutorial; https://www.youtube.com/watch?v=bDaxeg4HKQY; Image Detection with YOLO v2 Process Video in Python + openCV In a UNIX Terminal I'm able to do the following: Configure a virtual environment and activate it; source activate tensorvid Run a python script to setup the necessary dependencies python3 setup.py build_ext --inplace Run a python script successfully python video_processing.py Here is the initial code present

Jupyter interpreter permanently changed

大兔子大兔子 提交于 2021-01-29 08:10:07
问题 I was playing around with a new library which setup a new venv and interpreter (python 3.8) to the following location. import sys sys.executable '/Users/User/tensorflow_macos_venv/bin/python' While this was fine when I had activated the venv, once I deactivate it and run the Anaconda3 jupyter notebook again, I still see the same interpreter. Could someone help explain how to can I revert it back to the original? I tried going to the "change kernel" option (as mentioned in this answer) but I

Installing python packages in virtual environment [duplicate]

﹥>﹥吖頭↗ 提交于 2021-01-29 07:44:40
问题 This question already has answers here : How to install a package inside virtualenv? (11 answers) Closed 11 days ago . I'm trying to install django in a virtual environment. I'm in a virtual environment, but when i type pip install django I get a permission denied error. If I try to run sudo pip install django , however, I get sudo: pip: command not found . Not entierly sure where to go from here. 回答1: Since you setup your virtual environment with sudo virtualenv /opt/myenv , you now need to

kernel appeared in jupyter notebook but not working

丶灬走出姿态 提交于 2021-01-29 05:45:25
问题 I am planning to use virtual environment in jupyter notebook through the following steps: conda create -n test python==3.6 conda activate test ipython kernel install --user --name=test Then i get the following in return: Installed kernelspec test in C:\Users\User\AppData\Roaming\jupyter\kernels\test which seems to be working when I saw the test kernel appeared in jupyter notebook. However, when I switch to that kernel, it is actually using my default python enviroment. I also checked the

pyenv virtualenv activation not work when use full path

我们两清 提交于 2021-01-28 12:20:36
问题 I install pyenv on centos, and check if its working. # curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 104 2099 104 2099 0 0 14121 0 --:--:-- --:--:-- --:--:-- 18575 Initialized empty Git repository in /root/.pyenv/.git/ remote: Counting objects: 4531, done. remote: Compressing objects: 100% (1831/1831), done. remote: Total 4531 (delta 3252),

How to remove all pipenv virtualenvs when the directory was deleted?

大憨熊 提交于 2021-01-28 11:21:09
问题 I have a directory A/ containing a Pipfile and a Pipfile.lock obtained by running pipenv install . So this directory has a corresponding virtualenv at /home/username/.local/share/virtualenvs/A-... . Then I delete this A/ directory. Is there a way to check all pipenv virtualenvs, find directories that were deleted and remove the corresponding virtualenvs ? In this case it should find that A/ was deleted and so remove the virtualenv: /home/username/.local/share/virtualenvs/A-... . 回答1: It seems

How to make pipenv install <package> use SSL certificate of firewall?

安稳与你 提交于 2021-01-28 07:45:13
问题 Sitting behind a very strict firewall with SSL decryption, I usually install python packages (on macOS 10.15.) with these options pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org <packagename> . But pipenv install --trusted-host pypi.org --trusted-host files.pythonhosted.org <packagename> doesn't work: pipenv.vendor.requirementslib.exceptions.RequirementError: Failed parsing requirement from '--trusted-host' Since ignoring SSL didn't work, I tried to place the