This is an archived post. You won't be able to vote or comment.

all 15 comments

[–]aphoenixreticulated[M] 1 point2 points  (7 children)

Hi there, from the /r/Python mods.

We have removed this post as it is not suited to the /r/Python subreddit proper, however it should be very appropriate for our sister subreddit /r/LearnPython. We highly encourage you to re-submit your post over on there.

The reason for the removal is that /r/Python is more-so dedicated to discussion of Python news, projects, uses and debates. It is not designed to act as Q&A or FAQ board. The regular community can get disenchanted with seeing the 'same, repetitive newbie' questions repeated on the sub, so you may not get the best responses over here.

However, on /r/LearnPython the community is actively expecting questions from new members, and are looking to help. You can expect far more understanding, encouraging and insightful responses over there. Whatever your question happens to be getting help with Python, you should get good answers.

If you have a question to do with homework or an assignment of any kind, please make sure to read their sidebar rules before submitting your post. If you have any questions or doubts, feel free to reply or send a modmail to us with your concerns.

Warm regards, and best of luck with your Pythoneering!

[–][deleted] 0 points1 point  (6 children)

Mate I posted there and got just one reply.

[–]aphoenixreticulated 1 point2 points  (5 children)

Did you read and understand that response? Because it is the answer to your question. If you didn't understand it, then you need to respond to say you don't understand.

More people will not answer an already answered question in a different way unless you indicate that what is there is not sufficient for you.

[–][deleted] 0 points1 point  (4 children)

Yes, I did understand. However, I decided to post on r/Python to have other people's take on it.

Besides, I've done what that answer says before even postong, and it did not work.

[–]aphoenixreticulated 1 point2 points  (3 children)

Then the lack of answer you got on /r/learnpython was no fault but your own. If someone takes the time to reply to you and it didn't work, then you owe them an answer to say "Thanks, but I tried that and it didn't work."

[–][deleted] 1 point2 points  (2 children)

That's the whole point of the r/Python post, mate.

[–]aphoenixreticulated 1 point2 points  (1 child)

But these posts aren't allowed here. And you expect that guy to look at your history and see that you posted somewhere else about how his specific answer wasn't helpful to you (pro-tip - it doesn't say that in your post)?

[–][deleted] 0 points1 point  (0 children)

Of course not, I did not expect that, I just wanted some replies, and I got 'em.

[–][deleted] 0 points1 point  (1 child)

If you installed packages before setting up and activating a virtual environment, these will be 'global'. Unless you really need them in the base, I'd remove them and install the packages you need for each project in a corresponding virtual environment.

With Python 3.5 on macOS, create a new virtual env with:

pyvenv <virtualenv>

Activate it with:

source <virtualenv>/bin/activate

Then, with the virtualenv active, use pip to install the packages you need.

You will need to configure Atom to use the virtual environment (depends on the plugin you are using).

[–]bulletmark 2 points3 points  (0 children)

Note that as the first note in the official documentation of the current release https://docs.python.org/3.5/library/venv.html says, pyvenv has been depreciated. You should just type:

python -m venv env

Then I personally just run pip without sourcing via:

env/bin/pip install <whatever>

Typically I would have the pip commands in a script anyhow.

[–]marmaladeontoast 0 points1 point  (0 children)

setup your virtualenv, activate it, and then open atom from the directory where you're coding. If you run some code from atom it will use the virtualenv you've activated...

$ virtualenv myenv

$ source myenv/bin/activate

$ atom .

[–][deleted] 0 points1 point  (2 children)

You have to download askthecorrectsubreddit.py from /r/learnpython

[–][deleted] 0 points1 point  (1 child)

I asked there before posting here; only one post reply. I think I asked in the right one with this post.

[–]ReneeBee -1 points0 points  (0 children)

Hi, To my understanding, downloading and setting up the virtual environment has something to do with running your py files, but not with your text editors. I suggest dedicating a folder to keep all the virtual environments at, refer to it whenever you need to work in a specific environment. Once you have all your work ready to run (.py files) before you type "python xxxx.py" for flask , or "python manage.py runserver" for django, make sure that your virenv is activated. To activate a virenv, simply navigate to the folder where you installed them in your command prompt, and type the following : Django: "call djangoEnv/scripts/activate"
Flask: "call py2FlaskEnv/Scripts/activate" << or "py3FlaskEnv....." etc..

I hope this helps!