Source is not recognized as an internal command

Asked

Viewed 3,792 times

0

When trying to activate a virtual with the command source venv/bin/activate, message appears:

source não é reconhecido como comando interno.

All this on the console of Pycharm.

  • You use Linux?

2 answers

1

The Activate command has the purpose of activating a previously created virtual environment, if you already have a virtual environment created, configured and want to activate it the command is:

activate nome_do_ambiente

Otherwise I recommend the following Steps:

  1. Install the environment manager.

  2. Run the command to create the environment via Connect with the version of Python you want (in this case I put 3.6):

    conda create -n nome_do_ambiente python=3.6

  3. Access the environment created via the command:

    activate nome_do_ambiente

Note: For the above steps to be successfully executed a correct installation of the Python or Anaconda and the example scripts folder: C: Users Joao Anaconda3 Scripts is in the variable of path environment if the system is Windows

0

If I’m not mistaken the console of Pycharm executes the Python in interactive mode and not the shell of the operating system. The source is precisely one of the internal commands of the Bash, hence the command is not recognized.

The Pycharm has its own way of implementing virtual environments and that can be used globally or specifically within projects. For more details on how to do this, see the topic Configuring Python Interpreter of the manual.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.