2

My Ubuntu 'Bionic Beaver' installation does not recognize the mkvirtualenv sandboxing command. Although my approach was similar to the "shell startup file" approach highlighted here in the virtualenvwrapper documentation.

How would one go about installing and using the mkvirtualenv and workon commands?

Zanna
  • 70,465
kmb
  • 21
  • I'm not sure is what you're looking for, but installation of the package that contains both commands is via pip with the command: pip install virtualenvwrapper-win and usage is virtualenvwrapper-win official documentation is at: https://pypi.org/project/virtualenvwrapper-win/. Comment if you think this would be a legitimate answer to your question and I will post this as an answer instead of a comment. – karel May 12 '18 at 17:21
  • So reinstalled the package using pip however Ubuntu is still returning command not found. Are there any additional steps? If so would you mind detailing them all step by step; it bugs me that my platform still returning an error – kmb May 12 '18 at 17:36
  • This needs to be clarified before I would post an answer. For starters I will quote from the official virtualenvwrapper-win documentation: [as the name virtualenvwrapper-win suggests...] These scripts should work on any version of Windows (Windows XP, Windows Vista, Windows 7/8/10) . However, they only work in the regular command prompt. They will not work in Powershell. There are other virtualenvwrapper projects out there for Powershell. – karel May 12 '18 at 17:41
  • So is this what you're trying to do? It occurs to me that there might be another way of doing it in Ubuntu by running a script in PowerShell (if you are familiar with PowerShell): https://askubuntu.com/questions/905018/install-powershell-in-ubuntu-17-04/1026611#1026611. – karel May 12 '18 at 17:43
  • Thank you. I am using git bash and accessing Ubuntu through ssh. – kmb May 12 '18 at 17:49
  • Ubuntu is installed using vm software, specifically I am using vagrant here. The pip install command installs fine however – kmb May 12 '18 at 17:52
  • You'll need some extra help getting PowerShell installed in 18.04 so I added this information to: https://askubuntu.com/questions/905018/install-powershell-in-ubuntu-17-04/1026611#1026611 Another link is: What is an “AppImage”? How do I install it? – karel May 12 '18 at 17:56
  • 1
    Maybe I should clarify that the app that I am developing is in Ubuntu, and I need to create a sandbox for development. Will I be able to access mkvirtualenv from "git bash" – kmb May 12 '18 at 18:00
  • I'm confused about the necessity for using mkvirtualenv for creating the sandbox. The official Ubuntu repositories have an application for creating a Python sandbox: https://askubuntu.com/questions/603935/pyvenv-vs-venv-vs-python-virtualenv-vs-virtualenv-and-python-3/603937#603937 This is an app that I use and this app can be accessed through git bash. It's just a Python virtual environment program (but it doesn't have anything for Windows) that is run from the terminal. The Python virtual environment runs from the terminal, but it can run Python GUI apps too. – karel May 12 '18 at 18:35
  • Problem resolved. It appears that the command "mkvirtualenv"may have been removed for 16.04 forwards. Solution is there https://askubuntu.com/questions/603935/pyvenv-vs-venv-vs-python-virtualenv-vs-virtualenv-and-python-3/603937#603937 (1) sudo apt install virtualenv python3-virtualenv (2) virtualenv -p python3 env
    (3) source ./env/bin/activate (4) the command should show that you are working in the (env) sandbox. Thanks
    – kmb May 12 '18 at 18:56

0 Answers0