Mkvirtualenv - cannot install -r requirements.txt - django

I am a brand new Noob and have no idea how to make this Mkvirtualenv install the proper requirements for a tutorial I forked here.
I made the Mkvirtualenv(django-angular-tutorial) but when I try to install the requirements (which is in the forked folder on my desktop) it gives me this error saying that the directory is not found.
Do I have to manually put this forked folder into the Mkvirtualenv folder for it to find it? Or how does this work?

"No such file or directory: 'requirements.txt'". So, there is no requirements file.
From the ~ in your prompt, it appears you're still in your home directory, and never cd-ed into the cloned/forked folder. Your requirements file is probably there.

To answer my own question:
I was not in the proper directory. So terminal came back with an error saying that it could not find "requirements.txt"
What I had to do was first navigate to to the folder that the "requirements.txt" was located in.(The folder was located on my desktop)
In terminal I did this:
1) Navigated to my Forked Folder
Perez-Austin:~ perau$ cd /Users/perau/Desktop/folderThatHasRequirements
2) Now you are pointed to the right directory and should show up like this:
Perez-Austin:folderThatHasRequirements perau$
3) "Create" or "Workon" your MkVirtualEnv (mine is called django-angular-tutorial)
Perez-Austin:folderThatHasRequirements perau$ workon django-angular-tutorial
4) Then Install your -r requirements.txt to your MkVirtualEnv
(django-angular-tutorial)Perez-Austin:folderThatHasRequirements perau$ pip install -r requirements.txt
5) It should install

Related

Deleted miniconda folder, python won't run

I installed/ miniconda in the following directory:
/home/arturo/Documents/project1/pwd
but then I deleted it by typing:
rm -r pwd/
Now I can't run python anymore (from any directory). Not really sure what happened. I get this error:
bash: /home/arturo/Documents/project1/pwd/bin/python: No such file or directory
You have at least two choices:
Reinstall miniconda, into the same location as before.
Clear the executable cache with hash -r to eliminate the stale entry, which ties the python command to non-existent /home/arturo/Documents/project1/pwd/bin/python cf. What is the purpose of the hash command?

requirements.txt bad interpreter: No such file or directory

I'm working on a github repo which I just cloned. I have a new virtual environment and I'd like to add all of the packages from the requirements.txt file to the virtual env.
For some reason it is not finding my requirements.txt file.
Edit the first line of /Users/byrd/Desktop/Github Repositories/herokusite/venv/bin/pip file to correct the path to python. You can obtain this path by calling which python. I think it should be:
#!/Users/byrd/Desktop/Github\ Repositories/herokusite/venv/bin/python
EDIT: Seems like it is a known bug in unixes - you can't use spaces in shebang line.
Also try this workaround, it may help you.
Do not use spaces in any component of the path where your virtual environment is stored.
It causes problems for the bootstrapping process.
Create a new blank environment, in a directory that has no spaces in its path:
$ cd # this takes you to your home directory, in OSX its is /Users/yourlogin
$ cd Desktop
$ virtualenv myvenv
$ source myvenv/bin/activate
(myvenv) $ pip install -r /path/to/requirements.txt
first, execute which pip after activating the environment if you found a space between any of the folders like
as seen in this link
you must have noticed a space between the folder name
2nd july
next, delete the new virualenv (in my case envname) and rename the folder with space between its name
then create a new virual environment and then install the requirements through
pip install -r requirements.txt
on the folder location with the requirements file

ember app kit can't find .jshintrc

I'm trying to get started with ember-app-kit I wget the master.zip from github and unzip it. I moved the directory contents to another that I have named for my project. Then run npm install and bower install. But when I run grunt server I get
ERROR: Can't find config file: .jshintrc
Warning: Use --force to continue.
Aborted due to warnings.
%
What's wrong?
You could use cp -r <src> <dest> to include dotfiles. That will include subdirectories.
To copy both regular and dot files you can use cp <src>.* <src>* <dest>
ugh, turns out when I copied the directory over the hidden files didn't get copied
cp ember-app-kit-master/* myProject.
I ran
cp ember-app-kit-master/.* myProject to get the hidden files. Note the dot-star.

Build a go project from source

How can I build a Go project from source, instead of using go get domain.com/dir/project? For example, instead of
go get github.com/kr/godep
I want to build from the source:
git clone https://github.com/kr/godep.git
cd godep
GOPATH=/tmp/godep go build
The commands above will result in
dep.go:4:2: cannot find package "code.google.com/p/go.tools/go/vcs" in any of:
/usr/local/Cellar/go/1.2/libexec/src/pkg/code.google.com/p/go.tools/go/vcs (from $GOROOT)
/Users/hanxue/Source/godep/godep/src/code.google.com/p/go.tools/go/vcs (from $GOPATH)
save.go:5:2: cannot find package "github.com/kr/fs" in any of:
/usr/local/Cellar/go/1.2/libexec/src/pkg/github.com/kr/fs (from $GOROOT)
/Users/hanxue/Source/godep/godep/src/github.com/kr/fs (from $GOPATH)
Note: go 1.2 is installed in /usr/local/Cellar/go/1.2 with a link from /usr/local/Cellar/go/1.2/bin/go to /usr/local/bin/go
You need the GOPATH configured correctly. Sometimes a project doesn't have to be checked out in the "sub path" it expects, but often it does and certainly things that depend on it will expect to find it there. So instead of "go get" you can
mkdir -p /tmp/go/src
export GOPATH=/tmp/go
cd $GOPATH/src
mkdir -p github.com/kr/godep
cd github.com/kr/godep/..
git clone http://github.com/kr/godep.git
cd godep
go build
... now rinse and repeat for each dependency!
cd $GOPATH/src
mkdir -p code.google.com/p/
cd code.google.com/p
hg clone https://code.google.com/p/go.tools/
Yes, the vcs dependency was in "go.tools" and needed to be cloned with hg instead. It took a bit of web browsing to figure out. Okay, I think you can see why that's annoying to do by hand.
I'll leave the rest of the dependencies as an exercise for the reader, or you can just use "go get". :-)
A bonus tip that might be what you are really looking for: After checking out the first project, you can use "go get" in that directory to download the dependencies of the project. Sometimes if you have something that's not "go get'able" that's useful if the dependencies are.

virtualenv cannot workon project

I have been trying to follow this particular guide on setting up a workon function where I am able to quickly switch from project to project within a virtualenv...
https://python-guide.readthedocs.org/en/latest/dev/virtualenvs/
I'm trying to re-organize my virtualenv into one particular folder ( I don't know if this is a smart or dumb idea...):
Structure:
-master_folder/ #I'm currently in this folder
-virtual_enviornments/
-project1/
-project2/
-projects/
-project1/
-project2/
It so happens that I am stuck at the third step:
$ pip install virtualenvwrapper
$ export WORKON_HOME=~/Envs
$ source /usr/local/bin/virtualenvwrapper.sh #STUCK HERE
ERROR: -bash: /usr/local/bin/virtualenvwrapper.sh: No such file or directory
I know the file does not exist within the directory, so am I supposed to create it some other way? I'm really confused... #.#
After running which virtualenv:
/Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenv
Did I install my virtualenv incorrectly?
I did just do pip install virtualenv....
Thanks for all the help guys!
I dont't think you have installed virtual environment correctly.
Please go through this link
http://ayarshabeer.com/post/50973941605/install-multiple-django-version-using-virtualenvwrapper