mkvirtualenv command not found showing in my Git bash though I have done all the required steps - virtualenv

I want to create virtual env for my project and once I am entering mkvirtualenv profiles-api in my git bash, It is showing mkvirtualenv command not found.
vagrant up
vagrant ssh
vagrant#ubuntu-xenial:~s mkvirtualenv profiles-rest-api --python=python3
mkvirtualenv not found

Related

Activation script not found when creating a Python virtual environment

The activation script is not found when creating a Python virtual environment with the command mkvirtualenv of virtualenvwrapper.
After installing the 22.04 Linux Ubuntu version, I noticed that after installing virtualenv and virtualenvwrapper, I'm getting the following error when using the command mkvirtualenv test103 :
ERROR: Environment '/home/paul/.virtualenvs/test103' does not contain an activate script.
I made several research and here is my final .bashrc file update :
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
source /usr/local/bin/virtualenvwrapper.sh
export VIRTUALENVWRAPPER_ENV_BIN_DIR=usr/local/bin
Note that if I execute this command:
source /home/paul/.virtualenvs/test103/local/bin/activate
the virtual environment is activated! However, I prefer to use mkvirtualenv name and then workon name without errors.

How to run/start VsCode in Centos 7

I have installed vscode on a remote server(which means I have to use ssh) running on Centos 7. The version of vscode is 1.54.3.
When I run code, the line get executed but the vscode does not start. When I try /usr/share/code/code I get an error
:FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /usr/share/code/chrome-sandbox is owned by root and has mode 4755.
I have tried solving it using
cd /usr/share/code/
sudo chown root:root chrome-sandbox
sudo chmod 4755 chrome-sandbox
and
/usr/share/code/code --no-sandbox
But it does not work.
Where could I be doing wrong?
What worked for me
Reboot the host after installation
Update vscode: sudo yum update code
Change directory: cd /usr/share/code
Run: sudo chown root:root chrome-sandbox
Run: sudo chmod 4755 chrome-sandbox
Start vscode: code .
The latest version that is supported in CENTOS 7 is 1.53. You can download it from the developer's website: https://code.visualstudio.com/updates/v1_53

python2 -m virtualenv env - error - no module named virtualenv

Following the instructions here https://github.com/oppia/oppia/wiki/Installing-Oppia-%28Mac-OS%29, I'm trying to get a virtualenv up and running on Mac. All goes well until I try to run python2 -m virtualenv env
At this point I get /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named virtualenv
I'm not sure what I'm doing wrong here?

cannot activate virtualenv: No such file or directory

I have problem with activating virtualenv.
I'm working on the server and using SSH secure shell.
My final goal is to activate virtualenv and run the latest version of tensorflow
The following is the command lines:
jeonguyoang#vision6:~$ python3 -m venv tfenv
The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
apt-get install python3-venv
You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.
jeonguyoang#vision6:~$ source tfenv/bin/activate
-bash: tfenv/bin/activate: No such file or directory
jeonguyoang#vision6:~$ cd tfenv
jeonguyoang#vision6:~/tfenv$ ls
bin include lib lib64 pyvenv.cfg
jeonguyoang#vision6:~/tfenv$ cd bin
jeonguyoang#vision6:~/tfenv/bin$ ls
python python3
captured image of the commands
I think that there is no activate file.
Maybe re-installing virtualenv is the answer, but I cannot interrupt server settings..
Check if you have python 2 versions of pip and python (python-all & python-pip packages). Venv installs both v2 and v3 versions of python & pip (regardless of python version of venv).

Fail Jupyter Notebook installation on clean Ubuntu 14.04 LTS

How do I install develompment version of Jupyter Notebook?
$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py
$ sudo pip install virtualenv
$ cd ~
$ virtualenv local/python/jupyter
$ source local/python/jupyter/bin/activate
$ git clone --recursive https://github.com/ipython/ipython.git
$ cd ipython
$ pip install -e ".[notebook]"
Could not find a version that satisfies the requirement jupyter-notebook (from ipython==4.0.0.dev0) (from versions: )
Some externally hosted files were ignored as access to them may be unreliable (use --allow-external jupyter-notebook to allow).
No matching distribution found for jupyter-notebook (from ipython==4.0.0.dev0)
Could it be you have to install from the Jupyter repo now as things were moving around since the release of jupyter? Next releases will not be only for ipython but also for other kernels like julia and bash etc.
From https://github.com/jupyter/jupyter_notebook
Create a virtual env (ie jupyter-dev)
ensure that you have node/npm installed (ie brew install node on OS X)
Clone this repo and cd into it
pip install -r requirements.txt
pip install -e .