0

so I tried to set up an working environment to code some stuff with python. I used this really nice website newcoder.io to do it the right way. Unfortunately I came across a big problem I cannot solve by myself even after several hours of trial and error (sponsored by Google).

I installed all required packages starting from python, virtualenv, virtualenvwrapper. I also changed the .bashprofile for using Terminal as stated. Then I tried to test the working environment like described in the aforementioned website newcoder.io Test. As I was within the working environment named "TestEnv" I tried to install django via pip. Here is the result coming from Terminal:

(TestEnv)username:~ username$ pip install django
-bash: /Users/username/.virtualenvs/TestEnv/bin/pip: "/Users/brokenusername: bad interpreter: No such file or directory

As you can see there seems to be something wrong with the underlying links. I have to admit, that I recently changed my account name and the name of the home directory in OS X Mavericks (see "username" and "brokenusername" within the code). Everything went fine so far. The username is now without blank spaces in the name (a different, bigger problem, but solved). But pip still seems to keep the old "brokenusername".

My Question is, how do I change the "brokenusername" to "username" so that pip is able to its work.

Thanks for all advices.

Here is a sloth for all your efforts to help !

Please note: I am newbie when it comes to understand and change these kind of working environments. I tried my best to find a solution by myself. But it seems like I need some advice from the Internetz.

3
  • 1
    How about just deleting the virtualenv and creating a new one? Commented Nov 17, 2014 at 17:36
  • @tdelaney It actually worked! All my trial and errors where tested within a single environment. Now i created a new one and the pip install django command works! Thank you very much! Commented Nov 17, 2014 at 17:53
  • I'll write it as an answer. Commented Nov 17, 2014 at 17:56

1 Answer 1

2

virtualenv creates symlinks, environment variables and other path links in places like .pth files that are invalidated when you change the base path of the env. But environments are cheap to create so (assuming you haven't placed other files in the virtualenv directory) just delete it and build it again.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.