0👍
Based on the information in the comments, you have a virtual environment. To activate it in Visual Studio:
Activate an existing virtual environment
If you’ve already created a virtual environment elsewhere, you can activate it for a project as follows:
Right-click Python Environments in Solution Explorer and select Add Environment.
In the Browse dialog that appears, navigate to and select the folder that contains the virtual environment, and select OK. If Visual Studio detects a requirements.txt file in that environment, it asks whether to install those packages.
After a few moments, the virtual environment appears under the Python Environments node in Solution Explorer. The virtual environment is not activated by default, so right-click it and select Activate Environment.
In Visual Studio Code:
To select a specific environment, use the Python: Select Interpreter command from the Command Palette
https://code.visualstudio.com/docs/python/environments
To test if your virtual environment is working, you should go to the command line and activate it and then ensure ebcli
is installed. First, cd
into your project directory.
Unix:
$ source myvenv/bin/activate
(env) $ pip install ebcli
Windows:
C:\> myvenv\Scripts\activate.bat
C:\> pip install ebcli
0👍
The problem is with the hashbang on the first line of the eb script
If you open the script /Users/john/.ebcli-virtual-env/bin/eb
, you will notice that python3 in the hashbang is hardcoded to global python3 #!/usr/local/bin/python3
.
While the installation script is installing in a virtualenv, the main command script is still referring to the global python.
I just changed it to #!/usr/bin/env python3
and everything worked.
- [Django]-ImportError: No module named south
- [Django]-Send real time data to Django frontend
- [Django]-Django SESSION_COOKIE_DOMAIN