Not able to activate Conda Virtual Environment on Windows 8.1 machine - django

I have been working with Atom text editor, Anacond and Python for a project and I am able to activate the virtual environment, however, when I type in the command to activate the virtual environment, it does nothing. I have attached a screenshot.
However, when I run the command, conda info --envs I am able to view the environment.
Please advise.
Thanks in advance for help.

Related

Opening an existing Django project with VS Code through Anaconda

I installed Django and started a project via cmd yesterday. Today I installed Anaconda with VS Code and I now want to open my Django project in VS Code through Anaconda.
Is this possible? Id like Anaconda to be my interface for all my projects regardless of what they are. Is this possible?
thanks
V
I myself use Anaconda Environment in VSCode for Data Science Projects.
For this, first you need to prepare a virtual env from Anaconda. Here is the tutorial for it in the official documentation : https://code.visualstudio.com/docs/python/environments
Follow this tutorial as it is without missing any line of code they ask you to.
Once you are done setting it up. You just need to start your Django Project in VSCode.
At the bottom where you see Python just click on it and Select Interpreter. From their, a list of virtual envs and Python envs opens up choose the one you created from Anaconda.
You have anaconda libraries working in your project now.
You can also start Jupyter notebook in VSCode : https://code.visualstudio.com/docs/python/jupyter-support#_create-or-open-a-jupyter-notebook
This way you can purely shift to VSCode for all of your stuff.
Thank you

Django Saleor installing Dashboard 2.0 on windows

I am trying to install Saleor Dashboard 2.0 on my Windows 10 machine for a dev environment.
So far I have
git cloned the git clone dashboard into the same folder as the Saleor project
Then cd saleor/dashboard and ran npm i
The instructions were not really clear on how to configure the API_URI to http://localhost:8000/graphql/. It is not in the settings.py and the instructions were not clear on where this is.
Setting environment variable on Windows somehow didn't work for me.
I changed the value of below variable in src/config.ts and it worked !!
export const API_URI = "http://127.0.0.1:8000/graphql/";
But ideally it should work by setting system environment variable.
Please fill free to update here if anyone is able to run it with system env variable (without changing the code).
Thanks!!
try the following command in the command line.(this will not work in powershell)
set API_URI = "http://localhost:8000/graphql/"

Command not found for start new project

I am starting out with Django on my Mac, I installed Django2 and installed PyCharm
But when I try to run command from terminal to create a new project on desktop:
django-admin.py startproject name or
django-admin startproject name
then I get "command not found"
Pycharm shows my env at /Users/admin/PycharmProjects/untitled/venv
Please help
Thank you
I am not familiar with the environment on the Mac, but i think the setup are almost the same. It seems that you have not activated your environment.
I use the virtual env on an ubuntu and i have to activate the environmet before i can start creating projects and apps. I hope that helps.
https://www.jetbrains.com/help/pycharm-edu/creating-virtual-environment.html
I think this may help. You can specify your python environment in pycharm.

How do I access my virtual environment when I go into Terminal (Mac)?

I was going through a tutorial on Django for the first time and had to restart my computer. After it restarted, I lost access to my virtualenv instance in terminal. Can anyone help get me back in? I can see the virtual environment.
screenshot of Mac Terminal
Location of virtual server on Mac
Try with this $ Source path-of-virtualenv/bin/activate this may works

Using Windows to run a virtual environment Created on Ubuntu

so i have been developing a website with a backend database. The following is my current setup and it is working great:
Currently using Ubuntu 16.04
I created a virtualenv and downloaded Django and postgreSQL within the virtual environment.
I also downloaded and am using Python 3.5.2 within the virtual environment.
My entire folder structure is on GitHub so that I can edit the code on the go (Again, everything working fine on Ubuntu).
The problem comes when I want to start doing some editing on Windows 10 using Powershell. I am unsure of how to run the 'activate.sh', 'activate.csh', or 'activate.fish' file in order to run the virtual environment and initialize my server using 'python manage.py runserver' so I can start editing my website.
Has anyone run into the problem and found out how to fix this? Any help on how to get started working on Windows would be great.
If you need any more details id be glad to provide them.
Thanks!
Assuming that you have created a virtualenv on ubuntu without relocatable option. You will have to firstly create a new virtual environment on Windows because they have differences on OS variations. So navigate to the directory where you would like to create the new virtual environment on Windows and run the following command:-
virtualenv .
(Note the . specifies current directory option)
After this there will be three directories created in your directory namely
1) Include
2) Lib
3) Scripts
As now the activate.bat file is in Scripts you can activate your virtualenv by the following command:
Scripts\activate
After the environment is activated you can pip install -r requirements.txt and then run your manage.py script as usual.
For further reference you can read:-
https://virtualenv.pypa.io/en/stable/userguide/