SyntaxError in PyCharm [closed] - python

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
Can someone help me fix this issue:
File "/Users/mac/PycharmProjects/NoteBot/main.py", line 5
PATH =
^
SyntaxError: invalid syntax

I think you are trying to run the PS5 bot using the inbuilt python that comes on your mac, i.e., probably Python2.7.
The issue is the author of the bot used a feature introduced in Python 3.5 called type hints.
So you need to change the version of Python that Pycharm is using to a version above 3.5 (google this). Or just run the script from the Terminal app using:
python3 /Users/mac/PycharmProjects/NoteBot/main.py
Note: You may need to install selenium etc. again here using pip3. Pycharm probably will handle this for you if you get it to point at a Python3 installation.
Furthermore, if you want to learn to program in Python yourself after you snag a PS5 you may want to look into pyenv.

Related

How can I resolve a python version error issue? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 months ago.
Improve this question
I am trying to install the package conifer on python. The steps for installation are listed on the GitHub. After following such steps, I get a python version error as shown on the image attached. Nevertheless, I am running on the version the package requires. I am thinking it could be an issue with pip, and I tried different things, including replacing pip with pip3. It still did not work. Thus, I am wondering if anyone here has some advice regarding this issue. Thanks in advance.
I think you misread the error message, 3.7.12 not in ">=3.8" means "the current version 3.7.12 does not fall in the range 'versions greater than or equal to 3.8'" - and it clearly doesn't. That required version range at the end >=3.8 is what was defined for conifer and you'll see different ones for different packages, for example it could also be ==3.8 (i.e. has to be exactly 3.8) or <3.8 (only works for versions older than 3.8)

My "python" command and "which python" point to different python versions [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I am using Anaconda and found the "python" command of all different environments point to one python /home/ya/anaconda3/bin/python which is python 3.8. My base environment uses python 3.8 and I installed an environment myenv with python 3.7. However, I found when I type python within myenv, it always use 3.8 instead of 3.7.
Unless you're using zsh (where it's a builtin), which can only check the PATH. It doesn't know anything about functions or aliases.
Use type python as a more accurate way to see what python will run when your shell is bash.

Unable to import 'decouple' - Python [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
Does anyone know how to fix this?
i already did pip install python-decouple on my terminal, but vscode keep saying that is unable to import.
You may want to check which environment your vscode is using
https://code.visualstudio.com/docs/python/environments
If you did pip install python-decouple in a virtualenv, then you need to point the vscode python interpreter to that environment.
To select a specific environment, use the Python: Select Interpreter command from the Command Palette (Ctrl+Shift+P).

When trying to install requests in windows it is giving me a syntax error? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
It is telling me that "install" is an unresolved reference??? I have tried all of the suggestions presented, and this is frustrating as I am attempting to finish a course.
Run:
python -m pip install requests
It appears that you are in Python console and trying to install it in there. That is possible with iPython console using !:
!pip install requests
or using subprocesses(which is just overkill). Running in CMD.exe, or Powershell, assuming Python is on your Path, ought to work.

What does 'PYVERNODOTS' in Python C-extension modules mean? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
When I want to compile Python C-extension modules on Linux, the file name of the compiled modules is for example <name-of-module>.cpython-#PYVERNODOTS#m-x86_64-linux-gnu.so. However this only happens, when I compile for Python 3.7, in Python 3.6 the file name is <name-of-module>.cpython-36m-x86_64-linux-gnu.so.
The problem is, that Python 3.7 is unable to import the module with PYVERNODOTS in the file name, so here are my questions:
What does PYVERNODOTS mean? How can I fix the import issue?
EDIT:
I tested this on Ubuntu with Python 3.7.4 from Anaconda. The complete setup script is hosted at https://github.com/biotite-dev/biotite/blob/master/setup.py.
This seems to be an issue with Python 3.7.4. Running the compilation under Python 3.7.3 fixed this problem.

Categories

Resources