Uploading venv folder on github - github

Is it necessary to upload venv folder that itself contains 100's of files along with other folders and files of the same project to GitHub?

Simple answer no. In your gitignore file add the venv to ignore all the files inside your venv fold. Basically your venv fold store all the dependency for your projects, you could use pip freeze to generate the requirement.txt which others can use this file to reproduce the same environment as you did. Plus, the files inside your venv will be huge because it contains entire packages you installed.

You don't have to do that. What you can do is :
Remember your project python version.
Generate your Django project dependencies file requirement.txt.
-Create requirement.txt file use: pipreqs /path/to/your/project/ (I recommend pipreqs, it creates a project level requirement.txt file. You can also use pip freeze or other commands)
-Install all dependencies from it: pip install -r requirements.txt, make sure pip belongs to your virtualenv python other than OS default pip
Then you can easily install a brand new virtual env and install all dependencies.

Related

How to install package file to virtualenv folder?

I need to install python packages into a virtualenv. The virtualenv is placed on a ramdisk, and I want the actual files to be installed in the virtualenv folder so that I can benefit from the the lower latency when loading.
It is not clear to me from the documentation I have seen if the package files are downloaded (or imported from global) to the virtualevn folder, or stored globally with only a reference to the version in the virtualenv (ambiguity on import/access).
Which is default behaviour by virtualenv? I can not see the size of the venv folder increasing as I install packages.
Folder size before installing pandas, numpy, scikit, tesorflow,
keras: 4k
Folder size after: 4k
If importing the package files is not default behaviour, how can I install packages to the virtualenv folder and set the interpreter to load the installed packages from the folder?

Put existing virtualenv projects into virtualwrapper

Let's say that I have already created a virtualenv project by virtualenv venv. What is the best way to add this project to virtualwrapper? The way I can think of is creating a virtualwrapper folder, figuring out package dependencies, put the virtualenv project directory into virtualwrapper folder, and then install necessary packages. Is possible to avoid this tedious process?
No, virtualenvs are not portable, you cannot move existing virtualenv to $HOME/.virtualenvs where virtualwrapper stores it virtualenvs. Recreating is the only way.
There is one thing you can simplify — list installed projects with their versions and reinstall exactly that versions:
# In the venv
pip freeze > requirements.txt
deactivate
# Activate a new virtualwrapper-managed venv
workon newenv
pip install -r requirements.txt

How install an Emacs package from file

I have Emacs installed on an internal PC in the organization that is not open to the Internet.
For the sake of that question I'd like to install the "auto-complete" package.
I have downloaded a tar file from MELPA and a zip file from GitHub and copied them to my organization PC.
Now how can I install the auto-complete package using either the tar or zip file?
By the way I see in MELPA that the auto-complete package depends on the
pop-up 0.5.0 package.
Should I install that before?
See C-h f package-install-file
And yes, you will need to manually install any dependencies first, if Emacs will not be able to fetch them on its own.

How to replace node modules folder on a different computer?

I could not use git push for my ionic app due to the node modules folder being too long.
I used .gitignore to ignore the node_modules, platforms and the plugins folder as a solution.
My comp broke and now I have a loaner comp that I'd like to continue developing on.
When I git pull from this new computer, I know how to add back the platforms and plugins with command line tools, but I'm at a loss on how to add the node modules folder.
I saved app in a zip before my comp broke, but I can't even unzip this in my new comp because the node modules folder is too long when unzipping...
How do I get back the node modules folder into this cloned directory? (Side question, can I just copy the platforms and plugins folder from my zip into this cloned folder, or do I need to use command line tools with ionic platforms add ... and ionic plugin add ...?)
You'll need to open the command line and navigate to the project folder. Then you can run the following command to redownload the node packages. The node_modules folder is only necessary if you use the gulp tasks (such as sass).
npm install
The other two commands, ionic platforms add [platform] and ionic plugin add [plugin] setup the project for a particular platform and plugin. You can copy these two folders back in. When you create a platform, such as ios, you generate a set of files that you may modify for deployment. You'll want to retain the changes to the project configuration, so I would keep them in your git repository.

Nuget Command Line - Packages Being Installed But Not Added As a Reference in the Project

I am installing all my packages in a project using the following nuget command line command:
nuget install packages.config -o ..\packages
Everything is fetched correctly and added to the packages, yet no references are added to the project. If right click the solution folder and select to manage the nuget packages, I can see the packages installed in the project yet there are no references added for the next packages?
Am I missing a step here?
This is by design. We never modify the project file from outside of VS. The command you're running is basically "restore my packages folder" and should be used with this workflow http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages.