I'm unable to load the package list within PyCharm.
It looks like it's loading but I don't get anything.
I'm currently using PyCharm, and Anaconda3 is set as the Python interpreter, any ideas?
enter image description here
Related
I have a shared Cpanel host with the Litespeed web server. I want to deploy a Django application on it. After creating a Python application inside the Cpanel where I have not deployed the application on the host I try loading the website, and instead of displaying the Django version, I face 503 Unavailable!!
Also inside the "stderr.log" file, there is the following error.
/usr/local/lsws/fcgi-bin/lswsgi_wrapper: line 9: /opt/alt/python39/bin/lswsgi: No such file or directory
I'm creating the application with Python 3.9.
But it works when I create it with Python 3.8 and show the following message when I load the web,
It works!
Python 3.8.6
The issue is mostly caused by the lack of the Python 3.9 WSGI package. On out-of-date versions of LiteSpeed, the package needs to be installed manually.
To work around this, first ensure that LiteSpeed is up to date. LiteSpeed must be at version 5.4.10 for this to work. Once that is confirmed, execute the following script from LiteSpeed. It will pull the required Python Selector packages:
/usr/local/lsws/admin/misc/enable_ruby_python_selector.sh
Refer cpanel support
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.
I will be thankful if someone can help me with the following issue.
I am using windows 10
Django version: 2.1.1 with Python version: 3.5
I have my TensorFlow object detection API, that trained my images which is totally outside of my Django project.
However, I created my Django project after that in the same environment that I had my TensorFlow object detection models.
Both of them with the same (python version: 3.5).
Before creating the Django webpage, I always needed to run my 'Object_detection_image.py' from anaconda prompt line, otherwise, I got an error.
My question is: how I can specify my Object_detection_image.py path directory in the setting.py in Django using anaconda prompt line?
When I write my directory like this: C:\tensorflow1\models\research\object_detection
then how I can use anaconda prompt line in this path? because if I write it like this, it doesn't work. please help me.
Thank you.
I did not run it because I have a problem with how to write the path for my TensorFlow project. I thought if they locate in the same environment, I won't get any problem. I mean before creating Django I could not run it directly from the script. I had to use an anaconda prompt line. but now, since i have django i dont know how to do it.
My context
I'm educating myself with Python Flask via the official tutorial.
I'm using Pycharm IDE (community edition) in Ubuntu Destkop 16.
The issue
I open the sample code of this tutorial as a Pycharm project
Got the Invalid Python interpreter error as below snapshot
My question
How can I fix it?
It's looking for a functional Python installation.
If you open the 2 drop-down you've referenced you'll see a selection of Python installations on your machine.
The better option though, is to create a virtualenv for your current project, so click on the cog icon to the right of the Project Interpreter drop-down and click Create VirtualEnv and follow the prompts.
Once created, it should pick that VirtualEnv as the default Python interpreter for that project and your error will disappear, though remember, because it's a new virtualenv, it won't yet have Flask etc installed on it. You can install the Flask library by clicking the + icon underneath the cog and searching/installing for Flask.
Alternatively, create a requirements.txt file on your project root directory, with Flask as the contents, and PyCharm will notice that next time you are in a .py file and suggest to automatically install Flask.
i need some help.
I searched in internet but i didn't find any response. I'n new in python nad django :) that causes that i'm here.
Maybe i start at the beginning, i have some project django on heroku hosting, and i have repository on git. I check and i don't have ftp connection to heroku :/ and i have only repository on git. In this repository is requirement.txt file but there no information about version of modules.
I want to prepare enviroment on my ubuntu, i downloaded my existing django project and i started server by command
python manage.py server
I was informed by python that i need to install some of module, and library of python etc. Everything went ok until apperad info
ImportError: No module named plugins
There is no name of plugins this showed just plugins. I installed some module like django-plugins ( i think that module have a folder i dist-package like djangoplugins ). It did not help :/, than i created new folder in dist-package ( in python library folder ) "plugins" and i copied content form djangoplugins . This did not help :/. again showed me "ImportError: No module named plugins". i don't have any idea , whats i need to install, i installed every plugins i found in internet and it didn't help.
Maybe you had this problem ? i know that django can be 1.6 version.]
=====================================
PROBLEM SOLVED
I have wrong version of django and django-cms.