3 Replies - 220 Views - Last Post: 17 March 2019 - 10:25 AM Rate Topic: -----

#1 Newport_j   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 24-February 19

Moving apps into a virtual environment in Ubuntu

Posted 16 March 2019 - 05:33 PM

I have installed a virtual environment on my Ubuntu 16.04 pc. I have installed a lot of prerequisites in the virtual environment such a numpy, scipy matplotlib, etc. I have installed jupyter notebook also.

I would like to move a a jupyter program from the global ubuntu environment, to the virtual environment. It seems a lot better than rewriting the program.

So how do I do that? Also, what subdirectory do I put the jupyter program in the virtual environment?

Any help appreciated. Thanks in advance.

Respectfully,

Newport_j

Is This A Good Question/Topic? 0
  • +

Replies To: Moving apps into a virtual environment in Ubuntu

#2 ndc85430   User is offline

  • I think you'll find it's "Dr"
  • member icon

Reputation: 976
  • View blog
  • Posts: 3,849
  • Joined: 13-June 14

Re: Moving apps into a virtual environment in Ubuntu

Posted 16 March 2019 - 10:23 PM

You don't move anything. You activate the virtual environment when you want to use the Python installation and whatever libraries you have in there. The activate script basically sets some environment variables to point to the directories inside the venv.
Was This Post Helpful? 0
  • +
  • -

#3 Newport_j   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 24-February 19

Re: Moving apps into a virtual environment in Ubuntu

Posted 17 March 2019 - 10:20 AM

I have a program in Python that I was working on globally. I could not make it work globally, it required too many unique modifications to the operating system to make it work globally.

I created a virtual environment. I then made all of the unique mods there. That way everything is painless. When I installed Python 3.6.6 in the virtual environment. The software warned me during it install to not uninstall Python 3.5.2., if i did bad things would result. The Ubuntu 16.04 OS would fail. So I did not uninstall Python 3.5.2..

I just have a much worked on program in the global Desktop that I would like to move to the Virtual Environment Desktop.

I do not want to rewrite in again. How do I move it to the virtual environment?



Thanks in advance.


Respectfully,

Newport_j
Was This Post Helpful? 0
  • +
  • -

#4 ndc85430   User is offline

  • I think you'll find it's "Dr"
  • member icon

Reputation: 976
  • View blog
  • Posts: 3,849
  • Joined: 13-June 14

Re: Moving apps into a virtual environment in Ubuntu

Posted 17 March 2019 - 10:25 AM

Again, you don't need to move anything. Just activate the virtual environment, by running source bin/activate in your virtual environment's directory.

If you're having problems doing that (like errors or anything), then post the console output.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1