How to install older Django - django

I am using Pycharm and want to install an older version of Django. However, PC only seems to install V2. How can I configure Pycharm to install an older version?
This is about installing an older version, NOT changing a version that has already been installed. I want to configure Pycharm to INSTALL a specific version.

Specifically for installing through PyCharms UI, you can specify which version of a package you want to install in the package manager. Navigate to
File -> Settings(or Preferences on MacOs) -> Project: [project name] -> Project interpreter
and click on the + sign under the cog icon. Then search for Django and specify the version you want to install from the drop down menu below the Description field.
However, if you want to install a different version through the terminal, you should write something along the lines of
pip install Django==[your_version]

As far as I know, there is no way to change the version on creating a new project unless you use your own interpreter when creating a new project.
So you can first create your virtual environment with the django version you want, and then select that venv when creating a new django project:
virtualenv venv
source venv/bin/activate
pip install django==2.1
When you want to create a new project, select Existing Environment instead of New environment using... and use your custom venv.

It's not possible at the moment. The only workaround, as mentioned by Pedram, is to use the existing interpreter with needed version of Django installed.
I filed a feature request about that, feel free to vote and leave comments.
You may also find useful the following feature request https://youtrack.jetbrains.com/issue/PY-33804

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

Unable to install arcpy module using Pycharm

I realize this has come up before, but all the responses I've found were for different versions of Arc.
I have followed the steps from this link and set my project interpreter to python c:\Python27\ArcGIS10.4\python.exe. Based from what i've read, that should be set up with Arcpy pre-installed. However, if I look at the packages in the VENV, arcpy isn't listed. I've tried adding it using pip and the pycharm GUI package manager. There isn't a package just named arcpy, the options are:
arcpy-metadata
arcpy-virtualenv
arcpyext
arcpylogger
I have successfully installed all of them and they show up in the package list of the project virtual environment. Despite this, I still get "no module named arcpy" as an error when I go to run a script.
Any ideas about where i'm going wrong?
Thanks for your help.
So I've spent a while looking over the issue and using Conda as your project Interpreter is the fix to your issue. I've tested it myself as well. Here are some clear instructions on how to correctly install Conda and set up the environment in Pycharm:
To create a Conda environment:
Ensure that Anaconda or Miniconda is downloaded and installed on your computer, and you're aware of a path to its executable file.
(Refer to the installation instructions for more details.)
Press Meta+Comma to open the project Settings/Preferences.
In the Settings/Preferences dialog Meta+Comma, select Project | Project Interpreter. Click the The Configure project interpreter icon and select Add.
In the left-hand pane of the Add Python Interpreter dialog, select Conda Environment.
The following actions depend on whether the Conda environment existed before.
If New environment is selected:
Specify the location of the new Conda environment in the text field, or click Conda environment location and find location in your file system. Note that the directory where the new Conda environment should be located, must be empty!
Select the Python version from the list.
Specify the location of the Conda executable file in the text field, or click Conda executable location and find location in the Conda installation directory. You're basically looking for a path that you've used when installing Conda on your machine.
Select the Make available to all projects checkbox, if needed.
If Existing environment is selected:
Expand the Interpreter list and select any of the existing interpreters. Alternatively, click Select an interpreter and specify a path to the Conda executable in your file system, for example, C:\Users\jetbrains\Anaconda3\python.exe.
Select the checkbox Make available to all projects, if needed.
Click OK to complete the task.

How to choose the right version of Google Cloud library components in python?

I have a specific version of google-cloud-core in my server and I don’t know how to choose the other libraries in a way to make them suit with my google cloud core version.
I can’t just move to the latest versions because old programs cannot run into new versions for example BigQuery library.
My specific need is to know « how to know » which version of Google Cloud Storage should I choose according to the 0.26.0 core version.
Is there some repositories where we can find packages grouped by google-cloud-core versions?
In my case the version 1.6 of google-cloud-storage works but I found it just by downgrade and try again method !
Best regards
What you can do as a workaround is create a virtual environment, install a specific library - like google-cloud-storage - and check the dependencies installed with that library version. I made a quick test and installed a few versions of google-cloud-storage. For version 1.3.0, the google-cloud-core 0.26.0 dependency was installed.
You can do so by following these steps:
virtualenv env-name
source env-name/bin/activate
pip freeze (to check there is nothing there)
pip install google-cloud-storage==1.3.0
pip freeze (again)
Once finished you’ll see google-cloud-core 0.26.0 was installed.

How do I specify which version of the app I want to use in settings' INSTALLED_APPS

I've got a version of a module (South 0.6) installed system-wise and a newer version installed in my home. When I add 'south' to my INSTALLED_APPS, it uses the system-wise version. How can I tell Django to use the version in my home?
Thanks
Jul
Virtualenv (and virtualenvwraper) is definitely your friend for handling things like this when you are able to create a new environment. You should go ahead and play with it. If you are not able to mess around with virtualenv right now, you can just put your personal python lib path at the front of PYTHONPATH:
# from your command prompt:
$ export PYTHONPATH=$HOME/your/python/libs:$PYTHONPATH
There is a package named virtualenv which was designed to handle this specific problem. It allows you to create a virtual environment for each python project (ie. Django project), letting you choose which version of a module is installed.

Bring FMIT (Free Music INstrument Tuner) into Eclipse as a project, Build and Run in Ubuntu

I am trying to import the download available at http://home.gna.org/fmit/ into Eclipse (on Ubuntu), compile and run.
I have managed to create a C++ project in Eclipse, and then use the project wizard to import the home folder of the FMIT download. But I am lost when it comes to using the makefile to set the project up, build and run it.
I do .net VB website and Database development so I am kind of lost in Eclipse.
Thx
FMIT exists in Ubuntu's repository. Is there any reason why you can't just use Ubuntu's version, or do you specifically need to compile from source?
sudo apt-get install fmit